import { ContentItem, PopupModal } from '../schema/index.ts'; import { DropEdge } from '../dragSort'; import { PopupContentProps } from './PopupContent'; import { CardPreview } from '../cardResize'; export interface PopupMountProps { popup: PopupModal; fetchImpl?: typeof fetch; /** Preview mode: ignore frequency cap and don't record shows / navigate away. */ preview?: boolean; /** Force-open immediately, bypassing the trigger (builder preview uses this). */ forceOpen?: boolean; onClose?: () => void; /** Preview-only: fired with a content item's id when its element is clicked, or `null` when the click landed on empty card space. */ onItemActivate?: (id: string | null) => void; /** Builder-only: the item the editor has selected — see PopupContentProps. */ selectedItemId?: string | null; /** Builder-only: commit a text edit made in the canvas; enables editing mode. */ onItemEdit?: (id: string, patch: Partial) => void; /** Builder-only: a canvas drag dropped `draggedId` on `edge` of `targetId`. */ onItemReorder?: (draggedId: string, targetId: string, edge: DropEdge) => void; /** Builder-only: lends the form body out, so a drag from the sidebar picker can be aimed at the items rendered in it — see PopupContentProps. */ canvasRef?: PopupContentProps['canvasRef']; /** Builder-only: where an element dragged in from the sidebar would land. */ dropHint?: PopupContentProps['dropHint']; /** Builder-only: a canvas resize settled the submit button on `width` percent. */ onItemResize?: (id: string, width: number) => void; /** Builder-only: a canvas drag settled a spacer's gap at `height` px. */ onSpacerResize?: (id: string, height: number) => void; /** Builder-only: a canvas drag settled the card's width, height, padding or rounding. */ onCardResize?: (patch: CardPreview) => void; /** Builder-only: delete an item from its own canvas toolbar. */ onItemRemove?: (id: string) => void; /** Builder-only: the items the host pinned — they get no delete tool. */ pinnedItemIds?: readonly string[]; /** Builder-only: what an item's own tools call themselves, translated. */ itemToolLabels?: PopupContentProps['itemToolLabels']; /** Builder-only: what the card's handles call themselves, translated. */ cardHandleLabels?: PopupContentProps['cardHandleLabels']; /** Builder-only: the hint an empty inline-editable text shows, translated. */ inlineHint?: string; /** Builder-only: what a step with nothing on it says, translated. */ emptyStepHint?: string; /** Builder-only: the in-place editor for copy — see PopupContentProps. */ renderCopyEditor?: PopupContentProps['renderCopyEditor']; /** Preview-only: reports the rendered popup's phase (form / error / success). */ onPhaseChange?: (kind: 'form' | 'error' | 'success') => void; /** Builder-only: which step of a step form to show — see PopupContentProps. */ activeStep?: number; /** Builder-only: commit a step button's wording, edited on the canvas. */ onStepLabelEdit?: PopupContentProps['onStepLabelEdit']; } /** * The "mount" half: decides *whether* and *when* the popup shows (trigger + * frequency), handles dismiss affordances (overlay click, esc), and places it * as a full-page overlay or inline. Delegates all rendering to PopupContent. */ export declare function PopupMount({ popup, fetchImpl, preview, forceOpen, onClose, onItemActivate, selectedItemId, onItemEdit, onItemReorder, canvasRef, dropHint, onItemResize, onSpacerResize, onCardResize, onItemRemove, pinnedItemIds, itemToolLabels, cardHandleLabels, inlineHint, emptyStepHint, renderCopyEditor, onPhaseChange, activeStep, onStepLabelEdit, }: PopupMountProps): import("react").JSX.Element | null;