import { type Readable } from "svelte/store"; import { type StateDeclaration, type StateUpdate, type StateValue } from "../types/state"; export declare class PaywallStateStore { #private; readonly subscribe: Readable["subscribe"]; constructor(declarations?: Record); /** * Additive, non-overwriting registration. * Used by workflow screens to incrementally contribute their declarations to the shared store. */ registerDeclarations(declarations: Record): void; /** Replaces all declarations and values. Used when the workflow prop is swapped. */ reset(declarations: Record): void; /** * Apply a list of state updates, writing each resolved value to the target key. * Undeclared keys and type mismatches are ignored (iOS parity). */ applyUpdates(updates: StateUpdate[], payload?: StateValue): void; /** Snapshot of current state values (defaults overlaid with applied updates). */ get values(): Record; /** Snapshot of declared default values. */ get defaults(): Record; /** Returns true if the given value is compatible with the declared type of the key. */ matchesDeclaredType(value: StateValue, key: string): boolean; } export declare function setPaywallStateContext(store: PaywallStateStore): void; export declare function getPaywallStateContext(): PaywallStateStore | undefined; /** Returns the state store as a Readable, or a static no-op readable when no store is in context. */ export declare function getStateSignal(): Readable;