import type { VariantProps } from "../../../utils.js"; import type { previewVariants } from "./previews/variants.js"; import type { FileItemFormatted } from "../../domains/index.js"; /** * Default properties of a file preview component. * They are shared between the default and custom renderers. */ export interface FilePreviewDefaultProps extends Omit, "children">, VariantProps { onReplaceItem?: () => void; onRemoveItem?: () => void; onEditItem?: () => void; value: FileItemFormatted; disabled?: boolean; } /** * Properties that can be used to render a custom file preview component. * @see `renderFilePreview` property of the FilePickerPrimitiveProps. */ export type FilePreviewRendererProps = Omit & Record; /** * Default properties of a trigger component. * They are shared between the default and custom renderers. */ export interface TriggerDefaultProps extends React.HTMLAttributes { disabled?: boolean; text?: string; onSelectItem: () => void; } /** * Properties that can be used to render a custom trigger component. * @see `renderTrigger` property of the FilePickerPrimitiveProps. */ export type TriggerRendererProps = TriggerDefaultProps & Record;