import type { ComponentType, Context, Dispatch, MutableRefObject, ReactNode, SetStateAction } from 'react';
import type { AsProp, BaseProps, DeferInfer, TestIdProp, WithAttributes } from '../../types';
import type { DrawerProps } from '../Drawer';
export type PreviewProps = WithAttributes<'div', {
    children?: ReactNode;
    /** If true, the Preview Panel will render in a progress state. */
    progress?: boolean;
    /** Accessible label for the preview container. Will be constructed as 'Preview of X' */
    previewLabel?: string;
}> & Pick<DrawerProps, 'onBeforeOpen' | 'onAfterOpen' | 'onBeforeClose' | 'onAfterClose'> & AsProp & TestIdProp & BaseProps;
export interface PreviewPanelProps extends PreviewProps {
    open: DrawerProps['open'];
}
export interface PreviewOptions {
    previewProps: PreviewProps;
}
export interface PreviewManagerProps {
    children: ReactNode;
}
export interface PreviewMethods<P extends object = object> {
    updatePreview: (props: Partial<P>, options?: Partial<PreviewOptions>) => void;
    unmountPreview: () => void;
}
export interface PreviewContextValue extends Partial<PreviewMethods> {
    initialized: boolean;
    previewTriggerRef: MutableRefObject<HTMLElement | null>;
}
export interface PreviewManagerContextValue {
    /**
     * The function that will create the Preview. This function accepts the component to render
     * within Preview, props for that component, and options for the preview instance.
     */
    createPreview: <P extends object>(component: ComponentType<P>, props?: DeferInfer<P>, options?: PreviewOptions) => PreviewMethods<P>;
    PreviewContext: Context<PreviewContextValue>;
    initialized: boolean;
    previewActive: boolean;
    setPreviewActive: Dispatch<SetStateAction<boolean>>;
}
export interface PreviewObject<P extends object = object> {
    id: string;
    props: P;
    methods: PreviewMethods;
    Component: ComponentType<P>;
    options?: PreviewOptions;
}
//# sourceMappingURL=Preview.types.d.ts.map