import { type JSX } from 'solid-js'; import type { TorukArtifact } from '@/artifacts/artifacts.types'; import type { DuiArtifactAccess } from '@/widget/components/dynamic-ui/types'; import type { RenderableArtifact } from './ArtifactRenderer'; export type PreviewState = { open: boolean; artifact: RenderableArtifact | TorukArtifact | null; loading: boolean; notFound: boolean; error: string; }; export type ArtifactPreview = { state: () => PreviewState; openArtifact: (artifact: RenderableArtifact | TorukArtifact) => void; openArtifactById: (id: string | undefined | null) => void; close: () => void; }; export declare const useArtifactPreview: () => ArtifactPreview | undefined; export declare function createArtifactPreview(access: () => DuiArtifactAccess | undefined): ArtifactPreview; export declare function ArtifactPreviewProvider(props: { preview: ArtifactPreview; children: JSX.Element; }): JSX.Element;