import { ReactNode } from 'react'; export declare type ContentType = 'SITE_PAGE' | 'LANDING_PAGE' | 'BLOG_POST' | 'BLOG_LISTING' | 'EMAIL' | 'ANY'; export declare type BaseField = { advancedVisibility?: AdvancedVisibility; disabledControls?: DisabledControls; displayWidth?: string; helpText?: string; id?: string; inheritedValueDefaultValuePath?: string; inheritedValuePropertyValuePaths?: {}; inlineEditable?: boolean; inlineHelpText?: string | null; label: string; links?: { type: 'THEME_EDITOR' | 'BRAND_SETTINGS'; name: string; params: { theme_path?: string; theme_field_path?: string; brand_kit_tab?: string; }; }[]; internal?: boolean; locked?: boolean; name: string; occurrence?: { min: number; max?: number | null; sorting_label_field?: string; default?: number | null; }; propertyAliasesPaths?: {}; required?: boolean; sortable?: boolean; visibility?: Visibility; visibilityRules?: 'SIMPLE' | 'ADVANCED'; cssVariable?: string; cssVariableState?: string; agentContext?: string; contentTypes?: ContentType[]; }; export declare type BaseVisibility = { controlling_field?: string; controlling_field_path?: string; controlling_value_regex?: string; operator?: 'NOT_EQUAL' | 'EQUAL' | 'EMPTY' | 'NOT_EMPTY' | 'MATCHES_REGEX'; access?: { operator: 'HAS_ALL' | 'HAS_ANY' | 'HAS_NONE'; scopes?: string[]; gates?: string[]; } | null; occurrence_options?: { count?: number; operator?: 'NOT_EQUAL' | 'EQUAL' | 'EMPTY' | 'NOT_EMPTY' | 'GREATER_THAN' | 'GREATER_THAN_OR_EQUAL' | 'LESS_THAN' | 'LESS_THAN_OR_EQUAL'; }; property?: string; }; export declare type Visibility = BaseVisibility & { hidden_subfields?: {} | null; value_on_hide?: {}; }; export declare type AdvancedVisibility = { boolean_operator: 'AND' | 'OR'; criteria: BaseVisibility[]; children?: AdvancedVisibility[]; }; export declare type DisabledControlsRules = { boolean_operator?: 'AND' | 'OR'; criteria?: BaseVisibility[]; children?: DisabledControlsRules[]; rules?: DisabledControlsRules; }; export declare type DisabledControls = { message?: string; rules: DisabledControlsRules; }; export declare type AlignmentFieldType = BaseField & { type: 'alignment'; alignmentDirection?: 'HORIZONTAL' | 'VERTICAL' | 'BOTH'; default?: { horizontal_align?: 'LEFT' | 'CENTER' | 'RIGHT'; vertical_align?: 'TOP' | 'MIDDLE' | 'BOTTOM'; }; }; export declare type AudioFieldType = BaseField & { type: 'audioplayer'; default?: { file_id?: number; file_duration?: number; file_extension?: string; file_url?: string; title?: string; }; }; export declare type BackgroundImageFieldType = BaseField & { type: 'backgroundimage'; default?: { src?: string; background_position?: 'TOP_LEFT' | 'TOP_CENTER' | 'TOP_RIGHT' | 'MIDDLE_LEFT' | 'MIDDLE_CENTER' | 'MIDDLE_RIGHT' | 'BOTTOM_LEFT' | 'BOTTOM_CENTER' | 'BOTTOM_RIGHT'; background_size?: 'COVER' | 'CONTAIN' | 'AUTO'; }; }; export declare type BlogFieldType = BaseField & { type: 'blog'; placeholder?: string; default?: number | number[]; }; export declare type BooleanFieldType = BaseField & { type: 'boolean'; default?: boolean; display?: 'toggle' | 'checkbox'; }; export declare type CssUnit = 'px' | 'pt' | 'em' | 'rem' | '%' | 'ex' | 'ch'; export declare type BorderSideType = { width: { value: number; units: CssUnit; }; opacity: number; style: 'none' | 'solid' | 'dashed' | 'double' | 'groove' | 'ridge' | 'inset' | 'outset'; color: string; }; declare type BorderSide = 'top' | 'right' | 'bottom' | 'left' | 'all'; declare type BorderSubfieldName = 'width' | 'opacity' | 'style' | 'color'; export declare type BorderSubfieldPath = `${BorderSide}.${BorderSubfieldName}`; export declare type BorderHiddenSubfields = Partial>; export declare type BorderFieldType = Omit & { type: 'border'; allowCustomBorderSides?: boolean; binding?: { context: 'global_styles'; collection: ColorCollection; }; visibility?: Omit & { hidden_subfields?: BorderHiddenSubfields | null; }; default?: { top?: BorderSideType; right?: BorderSideType; bottom?: BorderSideType; left?: BorderSideType; all?: BorderSideType; }; }; declare type ExpandIconChoices = [ [ string, 'Caret' ], [ string, 'Chevron' ], [ string, 'Plus' ] ]; declare type LayoutChoices = [ [ string, 'Cards' ], [ string, 'Tiles' ], [ string, 'Minimal' ] ]; declare type IconSizeChoices = [ [ string, 'Small' ], [ string, 'Medium' ], [ string, 'Large' ] ]; declare type IconBackgroundShapeChoices = [ [ string, 'None' ], [ string, 'Square' ], [ string, 'Rounded' ], [ string, 'Circle' ] ]; declare type IconShapeChoices = [ [ string, 'Square' ], [ string, 'Rounded' ], [ string, 'Circle' ] ]; declare type CaseChoices = [ [ string, 'None' ], [ string, 'Upper' ], [ string, 'Lower' ], [ string, 'Title' ] ]; declare type ShapeChoices = [ [ string, 'Pill' ], [ string, 'Rounded' ], [ string, 'Rectangle' ] ]; declare type TextDecorationChoices = [[string, 'None'], [string, 'Underline']]; declare type CardShapeChoices = [ [ string, 'Extra rounded' ], [ string, 'Rounded' ], [ string, 'Rectangle' ] ]; declare type ShapePresetChoices = [ [ string, 'Circle' ], [ string, 'Semicircle' ], [ string, 'Rectangle' ], [ string, 'Triangle' ], [ string, 'Organic' ], [ string, 'Leaf' ], [ string, 'Arch' ], [ string, 'Ring' ] ]; declare type ShadowPresetChoices = [ [ string, 'None' ], [ string, 'Subtle' ], [ string, 'Medium' ], [ string, 'Bold' ] ]; declare type Presets = { expand_icon: ExpandIconChoices; layout: LayoutChoices; icon_size: IconSizeChoices; social_icon_size: IconSizeChoices; icon_background_shape: IconBackgroundShapeChoices; social_icon_background_shape: IconBackgroundShapeChoices; case: CaseChoices; icon_shape: IconShapeChoices; filled: ShapeChoices; unfilled: ShapeChoices; text_decoration: TextDecorationChoices; card_shape: CardShapeChoices; shape: ShapePresetChoices; shadow: ShadowPresetChoices; }; interface SharedChoiceFieldTypes { multiple?: boolean; reorderingEnabled?: boolean; placeholder?: string; default?: string | number | Array; } declare type BaseChoiceField = BaseField & SharedChoiceFieldTypes & { name: string; type: 'choice'; choices: [any, string][]; display?: 'radio' | 'checkbox' | 'select' | 'buttons' | 'pill'; preset?: keyof Presets; }; declare type ChoiceFieldWithPresetProperty

= BaseField & SharedChoiceFieldTypes & { name: string; type: 'choice'; choices: Presets[P]; display: 'buttons' | 'select'; preset: P; }; export declare type ChoiceFieldType = BaseChoiceField | ChoiceFieldWithPresetProperty<'expand_icon'> | ChoiceFieldWithPresetProperty<'layout'> | ChoiceFieldWithPresetProperty<'icon_size'> | ChoiceFieldWithPresetProperty<'social_icon_size'> | ChoiceFieldWithPresetProperty<'icon_background_shape'> | ChoiceFieldWithPresetProperty<'social_icon_background_shape'> | ChoiceFieldWithPresetProperty<'case'> | ChoiceFieldWithPresetProperty<'icon_shape'> | ChoiceFieldWithPresetProperty<'filled'> | ChoiceFieldWithPresetProperty<'unfilled'> | ChoiceFieldWithPresetProperty<'text_decoration'> | ChoiceFieldWithPresetProperty<'card_shape'> | ChoiceFieldWithPresetProperty<'shape'> | ChoiceFieldWithPresetProperty<'shadow'>; declare type ColorCollection = 'theme_colors' | 'secondary_palette'; export declare type ColorFieldType = BaseField & { type: 'color'; showOpacity?: boolean; renderShades?: boolean; collection?: ColorCollection; binding?: { context: 'global_styles'; collection: ColorCollection; }; alternateNames?: string[]; limitedOptions?: string[]; default?: { color?: string; css?: string; hex?: string; opacity?: number; rgb?: string; rgba?: string; }; }; export declare type CrmObjectFieldType = BaseField & { type: 'crmobject'; objectType: string; propertiesToFetch: Array; displayFormat?: string; displayProperties?: Array; placeholder?: string; default?: { id?: number; }; }; export declare type CrmObjectPropertyFieldType = BaseField & { type: 'crmobjectproperty'; objectType: string; placeholder?: string; default?: { property?: string; }; }; export declare type CtaFieldType = BaseField & { type: 'cta'; default?: string; }; export declare type DateFieldType = BaseField & { type: 'date'; default?: number; }; export declare type DateTimeFieldType = BaseField & { type: 'datetime'; step?: number; default?: number; }; export declare type EmailFieldType = BaseField & { type: 'email'; default?: Array; allowCustomEmailAddresses?: boolean; }; export declare type EmbedFieldType = BaseField & { type: 'embed'; supportedSourceTypes: Array<'oembed' | 'html' | 'media_bridge'>; supportedOembedTypes: Array<'photo' | 'video' | 'link' | 'rich'>; supportedMediaBridgeProviders: Array; resizable?: boolean; showPreview?: boolean; default?: { source_type?: 'oembed' | 'html' | 'media_bridge'; oembed_url?: string; oembed_response?: {}; size_type?: 'auto' | 'auto_custom_max' | 'auto_full_width' | 'exact'; width?: number; height?: number; max_width?: number; max_height?: number; embed_type?: string; media_bridge_object?: {}; }; }; export declare type FileFieldType = BaseField & { type: 'file'; picker: 'file' | 'image' | 'video' | 'document' | 'audio'; default?: string; }; export declare type FollowUpEmailFieldType = BaseField & { type: 'followupemail'; placeholder?: string; default?: string; }; declare type FontVariants = '100' | '100i' | '200' | '200i' | '300' | '300i' | '400' | '400i' | '500' | '500i' | '600' | '600i' | '700' | '700i' | '800' | '800i' | '900' | '900i'; export declare type FontFieldType = BaseField & { type: 'font'; loadExternalFonts?: boolean; alternateNames?: string[]; limitedOptions?: string[]; showAdvancedOptions?: boolean; minSize?: number; maxSize?: number; binding?: { context: 'global_styles'; collection: ColorCollection; }; default?: { font?: string; font_set?: 'DEFAULT' | 'GOOGLE' | 'CUSTOM'; google_font_variants?: FontVariants[]; size?: number; size_unit?: CssUnit; color?: string; styles?: { bold?: boolean; italic?: boolean; underline?: boolean; 'font-weight'?: string; 'font-style'?: string; 'text-decoration'?: string; }; variant?: string; fallback?: string; line_height?: number; letter_spacing?: number; casing?: 'none' | 'uppercase'; }; }; export declare type FormFieldType = BaseField & { type: 'form'; allowInlineFormEditing?: boolean; disableInlineFormEditing?: boolean; embedVersions?: Array<'v2' | 'v3' | 'v4'>; supportAllWebinarTypes?: boolean; default?: { form_id?: string; form_type?: 'HUBSPOT' | 'TICKET_FORM'; response_type?: 'inline' | 'redirect'; message?: string; redirect_id?: number; redirect_url?: string; workflow_id?: Array; webinar_id?: string; webinar_source?: string; gotowebinar_webinar_key?: string; embed_version?: 'v4'; }; }; export declare type GradientFieldType = BaseField & { type: 'gradient'; default?: { side_or_corner?: { verticalSide?: 'TOP' | 'BOTTOM'; horizontalSide?: 'LEFT' | 'RIGHT'; }; color?: Array; }; }; export declare type GradientColorType = { color: { r: string; g: string; b: string; a: number; }; }; export declare type HtmlFieldType = BaseField & { type: 'html'; default?: string; }; export declare type HubDbRowFieldType = BaseField & { type: 'hubdbrow'; tableNameOrId: string | number; columnsToFetch: Array; displayFormat?: string; displayColumns?: Array; placeholder?: string; default?: { id: number; }; }; export declare type HubDbTableFieldType = BaseField & { type: 'hubdbtable'; placeholder?: string; default?: string | number; }; export declare type HublFieldType = BaseField & { type: 'hubl'; default?: string; }; declare type IconSet = 'fontawesome-5' | 'fontawesome-5.0.10' | 'fontawesome-5.14.0' | 'fontawesome-6.4.2'; declare type IconValue = { name?: string; type?: 'SOLID' | 'REGULAR'; unicode?: string; }; declare type IconValueWithSet = IconValue & { set?: IconSet; }; export declare type IconFieldType = BaseField & { type: 'icon'; iconSet?: IconSet; default?: IconValue; }; declare type ImageFeatures = 'replace' | 'crop'; export declare type ImageFieldType = BaseField & { type: 'image'; resizable?: boolean; responsive?: boolean; showLoading?: boolean; enabledFeatures?: ImageFeatures[]; default?: { src: string; alt?: string; width?: number; height?: number; max_width?: number; max_height?: number; size_type?: 'auto' | 'auto_custom_max' | 'auto_full_width' | 'exact'; loading?: 'disabled' | 'eager' | 'lazy'; }; }; export declare type LinkFieldType = BaseField & { type: 'link'; placeholder?: string; showAdvancedRelOptions?: boolean; supportedTypes?: Array; default?: { url?: { type: UrlTypes; content_id?: number | null; href: string; }; open_in_new_tab?: boolean; no_follow?: boolean; sponsored?: boolean; user_generated_content?: boolean; }; }; export declare type LogoFieldType = BaseField & { type: 'logo'; default?: { src?: string; alt?: string; width?: number; height?: number; override_inherited_src?: boolean; loading?: string; suppress_company_name?: boolean; }; showLoading: boolean; }; export declare type MeetingFieldType = BaseField & { type: 'meeting'; embeddable?: boolean; placeholder?: string; default?: string; }; export declare type MenuFieldType = BaseField & { type: 'menu'; placeholder?: string; default?: number | string; }; export declare type NumberFieldType = BaseField & { type: 'number'; default?: number | null; prefix?: string; suffix?: string; min?: number; max?: number; step?: number; display?: 'text' | 'slider'; format?: 'ANY' | 'INTEGER'; placeholder?: string; }; export declare type PageFieldType = BaseField & { type: 'page'; placeholder?: string; default?: number | number[]; }; export declare type PaymentFieldType = BaseField & { type: 'payment'; default?: { id?: number; }; }; export declare type PodcastFieldType = BaseField & { type: 'podcast'; entityType?: 'episode' | 'show'; default?: { episode_id?: number; show_id?: number; }; }; declare type RichTextFeatures = 'block' | 'heading' | 'font_family' | 'font_size' | 'bold' | 'italic' | 'underline' | 'text_color' | 'background_color' | 'alignment' | 'bulleted_list' | 'numbered_list' | 'lineheight' | 'outdent' | 'indent' | 'strikethrough' | 'superscript' | 'subscript' | 'code_format' | 'link' | 'image' | 'emoji' | 'personalize' | 'cta' | 'embed' | 'video' | 'table' | 'charmap' | 'anchor' | 'hr' | 'nonbreaking_space' | 'source_code' | 'visual_blocks' | 'colors' | 'fonts' | 'indents' | 'lists' | 'standard_emphasis' | 'advanced_emphasis'; export declare type RichTextFieldType = BaseField & { type: 'richtext'; default?: string; enabledFeatures?: RichTextFeatures[]; placeholder?: string; binding?: { context: 'global_styles'; collection: ColorCollection; }; }; export declare type SfdcCamapaignFieldType = BaseField & { type: 'salesforcecampaign'; default?: string; }; export declare type SimpleMenuFieldType = BaseField & { type: 'simplemenu'; default?: Array<{}>; }; export declare type SpacingValueType = { value: number; units: CssUnit; }; export declare type SpacingLimitType = { min: number; max: number; units: Array; }; export declare type SpacingFieldType = BaseField & { type: 'spacing'; limits?: { padding: { top?: SpacingLimitType; right?: SpacingLimitType; bottom?: SpacingLimitType; left?: SpacingLimitType; }; margin: { top?: SpacingLimitType; right?: SpacingLimitType; bottom?: SpacingLimitType; left?: SpacingLimitType; }; }; default?: { padding?: { top?: SpacingValueType; right?: SpacingValueType; bottom?: SpacingValueType; left?: SpacingValueType; }; margin?: { top?: SpacingValueType; right?: SpacingValueType; bottom?: SpacingValueType; left?: SpacingValueType; }; }; }; export declare type SurveyFieldType = BaseField & { type: 'survey'; placeholder?: string; default?: { survey_type?: 'CES' | 'CSAT' | 'NPS'; id?: string; }; }; export declare type TagFieldType = BaseField & { type: 'tag'; tagValue: 'SLUG' | 'NAME' | 'ID' | 'ALL'; default?: string | number | { slug: string; id: string; name: string; }; }; export declare type TextFieldType = BaseField & { type: 'text'; default?: string; validationRegex?: string; validationErrorMessage?: string; allowNewLine?: boolean; showEmojiPicker?: boolean; placeholder?: string; }; export declare type TextAlignmentFieldType = BaseField & { type: 'textalignment'; default?: { text_align?: 'LEFT' | 'CENTER' | 'RIGHT' | 'JUSTIFY'; }; }; declare type UrlTypes = 'EXTERNAL' | 'CONTENT' | 'FILE' | 'EMAIL_ADDRESS' | 'BLOG' | 'CALL_TO_ACTION' | 'WHATSAPP_NUMBER' | 'PHONE_NUMBER' | 'PAYMENT'; export declare type UrlFieldType = BaseField & { type: 'url'; supportedTypes: Array; default?: { type?: UrlTypes; href?: string; content_id?: number | null; supported_types?: Array; }; }; export declare type VideoFieldType = BaseField & { type: 'videoplayer'; resizable?: boolean; showAdvancedOptions?: boolean; showPreview?: boolean; default?: { player_id?: number; width?: number; height?: number; max_width?: number; max_height?: number; size_type?: 'exact' | 'auto' | 'auto_custom_max' | 'auto_full_width'; player_type?: string; loop_video?: boolean; mute_by_default?: boolean; autoplay?: boolean; hide_controls?: boolean; conversion_asset?: any; }; }; export declare type VariantManagementFieldType = BaseField & { type: 'variantmanagement'; variantDefinitionName: string; default?: undefined; }; export declare type VariantSelectionFieldType = BaseField & { type: 'variantselection'; variantDefinitionName: string; default?: { variant_name?: string; }; }; export declare type WorkflowFieldType = BaseField & { type: 'workflow'; default?: number; }; declare type GroupOccurrenceMeta = { featured_enabled?: boolean; featured_limit?: number; }; export declare type GroupFieldType = BaseField & { type: 'group'; children?: Field[]; expanded?: boolean; default?: [] | {}; tab?: 'STYLE'; groupOccurrenceMeta?: GroupOccurrenceMeta; useLargeLabel?: boolean; display?: `drilldown` | `accordion` | `inline` | `tabs`; icon?: IconValueWithSet; preview?: string; }; declare type CamelCaseField = AlignmentFieldType | AudioFieldType | BackgroundImageFieldType | BlogFieldType | BooleanFieldType | BorderFieldType | ChoiceFieldType | ColorFieldType | CrmObjectFieldType | CrmObjectPropertyFieldType | CtaFieldType | DateFieldType | DateTimeFieldType | EmailFieldType | EmbedFieldType | FileFieldType | FollowUpEmailFieldType | FontFieldType | FormFieldType | GradientFieldType | GroupFieldType | HtmlFieldType | HubDbRowFieldType | HubDbTableFieldType | HublFieldType | IconFieldType | ImageFieldType | LinkFieldType | LogoFieldType | MeetingFieldType | MenuFieldType | NumberFieldType | PageFieldType | PaymentFieldType | PodcastFieldType | RichTextFieldType | SfdcCamapaignFieldType | SimpleMenuFieldType | SpacingFieldType | SurveyFieldType | TagFieldType | TextAlignmentFieldType | TextFieldType | UrlFieldType | VariantManagementFieldType | VariantSelectionFieldType | VideoFieldType | WorkflowFieldType; export declare type Field = CamelToSnakeCaseMap; export declare type FieldType = CamelCaseField['type']; declare type CamelToSnakeCase = S extends `${infer T}${infer U}` ? `${T extends Capitalize ? '_' : ''}${Lowercase}${CamelToSnakeCase}` : S; declare type CamelToSnakeCaseMap = { [K in keyof T as CamelToSnakeCase]: T[K]; }; declare type AdaptChildren = { [Property in keyof T]: Property extends 'children' ? ReactNode : T[Property]; }; export declare type FieldComponentProps = AdaptChildren, 'type'>>>; export declare type FieldGroupWithChildren = Omit & { children: C; }; export declare type RepeaterGroup = Array>; export declare type RequiredField = { _requiredField: InferDefault & {}; }; declare type InferDefault = T extends { default?: infer D; } ? D : T; declare type ExtractNullableDefault = T extends { _requiredField: infer R; } ? R : InferDefault; declare type DefaultValue = T extends { children: infer C; } ? DefaultValues : T extends { _repeater: infer R; }[] ? DefaultValues[] : ExtractNullableDefault; export declare type DefaultValues = { [P in keyof T]: DefaultValue; }; export {};