import { ClaimableSettlement, PreAuthSettlement } from '@fanfare-io/fanfare-sdk-core/experiences'; import { TimedReleaseDisplayState } from '@fanfare-io/fanfare-sdk-core/internals'; import { GrantedSelection, SelectionAvailability, SelectionChoice, SelectionDraft, SelectionOptions } from '@fanfare-io/fanfare-sdk-core/selections'; import { ReadableAtom } from 'nanostores'; import { SelectionCheckoutDetails } from '../../lib/selection-display'; import { OutcomeAction } from '../compositions/outcome-panel'; import { OutcomeReason } from '../module'; export interface TimedReleaseModuleProps { display$?: ReadableAtom; sequencePhase: "enterable" | "participating" | "granted" | "ended"; canEnter: boolean; canLeave: boolean; /** Enter action handler; carries the entry pick on a selection-bearing release. */ onEnter: (selection?: SelectionChoice) => Promise; onLeave: () => Promise; onComplete?: () => Promise; isEntering: boolean; isLeaving: boolean; countdownTo?: Date; checkoutUrl?: string; /** * Activating the checkout CTA. Receives the pick the grant settled on, with the catalogue * objects behind it, whenever the panel has loaded the catalogue that carries them. */ onCheckoutClick?: (details?: SelectionCheckoutDetails) => void | Promise; /** Set when `onCheckoutClick` consumes the details, so the CTA waits for a catalogue still loading. */ awaitCheckoutDetails?: boolean; /** Granted-state selection arm; drives the panel's pick, reveal and summary states. */ grantedSelection?: GrantedSelection; /** How the win settles; selects the granted confirm label and payment affordance. */ settlement?: ClaimableSettlement | PreAuthSettlement; /** The release captures a product choice at entry, so the entry branch renders the picker. */ selectionRequired?: boolean; /** Bound by the widget against the journey; must be referentially stable. */ loadSelectionOptions?: () => Promise; /** The choice already recorded for this entry. */ recordedSelection?: SelectionChoice | null; /** Live availability of the recorded pick. */ selectionAvailability?: SelectionAvailability; /** Submits the granted pick or re-pick. */ onSelect?: (choice: SelectionChoice) => Promise; /** Every local pick-surface transition, product-only drafts included; feeds the page-bridge event. */ onDraftChange?: (draft: SelectionDraft) => void; /** Locked copy for a resolved granted summary; "checkout" once checkout has started. */ selectionLockedReason?: "checkout" | "final"; /** Already-translated selection failure from the widget, rendered beside the acting control. */ selectError?: string | null; /** The refusal code behind `selectError`; a stock refusal refetches the catalogue once. */ selectErrorCode?: string | null; grant?: string; expiresAt?: number | Date; outcomeReason?: OutcomeReason; /** Host-provided action shown on the terminal panel. */ outcomeAction?: OutcomeAction; onReenter?: () => Promise; isReentering?: boolean; class?: string; className?: string; } export declare function TimedReleaseModule(props: TimedReleaseModuleProps): import("solid-js").JSX.Element; export declare namespace TimedReleaseModule { var displayName: string; }