import { a as Containable, c as OptionallyDismissable, l as Proxyable, n as Closable, o as Dismissable, r as ConfettiContainer, s as Finishable } from "./types-C-q5VrLk.js"; import { t as BaseConfettiProps } from "./Confetti-ClwOwSrM.js"; //#region src/contracts/api.d.ts type Template = 'TriggerPopover' | 'Popover' | 'Modal' | 'Embedded' | 'Stepper'; interface MountHandle { readonly id: number; } interface MountPropsBase extends Finishable { surveyId: string; publishableKey: string; respondent: string; metadata?: Record; apiBaseUrl?: string; telemetry?: Partial<{ version?: string; }>; options?: unknown; } interface PopoverMountProps extends MountPropsBase, Dismissable {} interface ModalMountProps extends MountPropsBase, OptionallyDismissable {} interface EmbeddedMountProps extends MountPropsBase, Closable {} interface StepperMountProps extends MountPropsBase, Closable {} interface TriggerPopoverMountProps extends PopoverMountProps { isOpen?: boolean; } interface MountPropsByTemplate { Popover: PopoverMountProps; Modal: ModalMountProps; Embedded: EmbeddedMountProps; Stepper: StepperMountProps; TriggerPopover: TriggerPopoverMountProps; } interface ConfettiApi { readonly version: string; readonly protocolVersion: typeof EXPECTED_WIRE_PROTOCOL_VERSION; readonly channel: 'stable'; mount(options: { template: T; element: HTMLElement; props: MountPropsByTemplate[T]; }): MountHandle; update(handle: MountHandle, props: MountPropsByTemplate[T]): void; unmount(handle: MountHandle): void; } declare const EXPECTED_WIRE_PROTOCOL_VERSION = 1; declare global { interface Window { __confetti?: ConfettiApi; } } //#endregion //#region src/loader.d.ts type SupportedChannel = 'stable'; //#endregion //#region src/hosted/types.d.ts /** * Host-side options for loading and gating the hosted CDN bundle, layered on top * of the shared survey config (`BaseConfettiProps`) by every hosted shell. * `isSurveyVisible` is not declared here: it already arrives through * `BaseConfettiProps`, which the shells extend. */ interface HostedLoaderProps extends Proxyable { /** * Release channel of the hosted bundle and stylesheet to load. * @default 'stable' */ channel?: SupportedChannel; /** Invoked on script-load failure. Default behaviour is silent no-op. */ onError?: (error: Error) => void; } //#endregion //#region src/hosted/EmbeddedConfetti.d.ts interface EmbeddedConfettiProps extends Omit, HostedLoaderProps, Closable, Containable {} declare function EmbeddedConfetti(props: EmbeddedConfettiProps): import("react").JSX.Element | null; //#endregion //#region src/hosted/ModalConfetti.d.ts interface ModalConfettiProps extends Omit, HostedLoaderProps, OptionallyDismissable {} declare function ModalConfetti(props: ModalConfettiProps): import("react").JSX.Element | null; //#endregion //#region src/hosted/PopoverConfetti.d.ts interface PopoverConfettiProps extends Omit, HostedLoaderProps, Dismissable {} declare function PopoverConfetti(props: PopoverConfettiProps): import("react").JSX.Element | null; //#endregion //#region src/hosted/StepperConfetti.d.ts interface StepperConfettiProps extends Omit, HostedLoaderProps, Closable, Containable {} declare function StepperConfetti(props: StepperConfettiProps): import("react").JSX.Element | null; //#endregion //#region src/hosted/TriggerPopoverConfetti.d.ts interface TriggerRenderProps { /** Opens the popover survey. */ onClick: () => void; /** Whether the popover is currently open. */ isOpen: boolean; /** Whether the respondent has already submitted the survey. */ isSubmitted: boolean; } interface TriggerPopoverConfettiProps extends Omit, HostedLoaderProps { /** * Renders the element that opens the popover. Receives the click handler and * the open and submitted state. Defaults to the built-in trigger button. */ trigger?: (renderProps: TriggerRenderProps) => React.ReactNode; } declare function TriggerPopoverConfetti(props: TriggerPopoverConfettiProps): import("react").JSX.Element | null; //#endregion //#region src/hooks/useVisibleAfterDelay.d.ts interface UseVisibleAfterDelayOptions { delay: number; } declare const useVisibleAfterDelay: ({ delay }: UseVisibleAfterDelayOptions) => { isVisible: boolean; }; //#endregion //#region src/hooks/useVisibleAfterPageVisits.d.ts interface UseVisibleAfterPageVisitsOptions { visits: number; respondent?: string; } declare const useVisibleAfterPageVisits: ({ visits, respondent }: UseVisibleAfterPageVisitsOptions) => { isVisible: boolean; reset: () => void; }; declare const useVisibleAfterSessionPageVisits: ({ visits, respondent }: UseVisibleAfterPageVisitsOptions) => { isVisible: boolean; reset: () => void; }; //#endregion //#region src/hooks/useVisibleAfterScroll.d.ts interface UseVisibleAfterScrollOptions { threshold: number; } declare const useVisibleAfterScroll: ({ threshold }: UseVisibleAfterScrollOptions) => { isVisible: boolean; }; //#endregion export { type ConfettiContainer, EmbeddedConfetti, type EmbeddedConfettiProps, ModalConfetti, type ModalConfettiProps, PopoverConfetti, type PopoverConfettiProps, StepperConfetti, type StepperConfettiProps, TriggerPopoverConfetti, type TriggerPopoverConfettiProps, type TriggerRenderProps, useVisibleAfterDelay, useVisibleAfterPageVisits, useVisibleAfterScroll, useVisibleAfterSessionPageVisits };