import { FormWidgetTheme, PartnerFormFraming, PartnerFormStyle } from "@xapp/stentor-form-widget-channel"; /** * The reserved preset name that forces the partner style off for a single form, * whatever the partner record says. A permanent per-form exception. */ export declare const STYLE_PRESET_NONE = "none"; export interface FormStyleContext { /** * True only for the stand-alone booking page. A form embedded on the customer's * own website is the customer's own chrome -- the preset must never apply there, * or every embedded form belonging to a styled partner would silently change * appearance. */ readonly standalone?: boolean; /** * The form's own tri-state preset -- see FormWidgetEnv.stylePreset. */ readonly stylePreset?: string; /** * Canonical code of the partner the form belongs to. */ readonly partnerCode?: string; /** * The customer's own theme, which the preset merges over. */ readonly customerTheme?: FormWidgetTheme; /** * Looks a named style bundle up. API-served, with a code fallback. */ readonly getPresetStyle?: (preset: string) => PartnerFormStyle | undefined; } export interface ResolvedFormStyle { /** * The preset that applied, or undefined when the form is left alone. */ readonly preset?: string; /** * The theme to hand the widget: the customer's, with the preset merged over it. */ readonly theme?: FormWidgetTheme; /** * The partner chrome to draw around the form, if the preset defines any. */ readonly framing?: PartnerFormFraming; } /** * Works out which named style bundle applies to a form, or undefined for none. * * `stylePreset` is tri-state and overrides the partner record either way: * absent inherits `formStyle.enabled`, a name forces on, "none" forces off. */ export declare function resolveStylePresetName(context: FormStyleContext): string | undefined; /** * Resolves the preset and applies it, returning the theme the widget should use and * the framing it should draw. */ export declare function resolveFormStyle(context: FormStyleContext): ResolvedFormStyle; /** * Merges a preset theme *over* a customer theme: the preset wins where it defines a * value, and the customer's values survive everywhere the preset is silent. Nested * groups (font, text, card, standAlone, ...) merge rather than replace, so a preset * that only sets `font.fontFamily` keeps the customer's `font.link`. */ export declare function mergeFormWidgetTheme(base?: FormWidgetTheme, override?: FormWidgetTheme): FormWidgetTheme | undefined;