/** * Utility functions for BookingForm * * Note: This file should not import from booking-form.ts to avoid circular dependencies. * Type guards use generic types that will be compatible with BookingFormServiceConfig. */ import { forms } from '@wix/forms'; /** * Type guard to check if config has formId */ export declare function hasFormId(config: T | undefined): config is T & { formId: string; serviceIds?: string[]; }; /** * Type guard to check if config has pre-loaded form */ export declare function hasForm(config: T | undefined): config is T & { form: forms.Form; }; /** * Extracts the form ID from a form object. * @param form The form object to extract ID from * @returns The form ID or undefined if not found */ export declare function extractFormIdFromForm(form: forms.Form): string | undefined; /** * Configuration object that may contain formId or form. * Used by extractFormIdFromConfig. */ export type FormIdConfig = { formId: string; serviceIds?: string[]; } | { form: forms.Form; } | undefined; /** * Extracts the form ID from a config object (either formId directly or from form object). * @param config The config object containing either formId or form * @returns The form ID or undefined if not found/extractable */ export declare function extractFormIdFromConfig(config: FormIdConfig): string | undefined;