import type { ElementalContent } from "@/types/elemental.types"; import type { VariableValidationConfig } from "@/types/validation.types"; import type { HTMLAttributes } from "react"; import type { ChannelType } from "../../store"; import type { BrandEditorProps } from "../BrandEditor"; import { type MessageRouting } from "../Providers/store"; import type { Theme } from "../ui-kit/ThemeProvider/ThemeProvider.types"; export interface TemplateEditorProps extends Omit, "autoSave" | "value" | "onChange"> { theme?: Theme | string; value?: ElementalContent | null; onChange?: (value: ElementalContent) => void; /** * Variables available for autocomplete suggestions. * When provided, typing {{ will show a dropdown with matching variables. * When not provided (undefined), all variable functionality is disabled: * the variable toolbar button is hidden and typing {{ will not create variable chips. */ variables?: Record; /** * When true, disables variable autocomplete and allows users to type any variable name. * When false (default), shows autocomplete dropdown with variables from the `variables` prop. * @default false */ disableVariablesAutocomplete?: boolean; /** * Configuration for custom variable validation. * Allows restricting which variable names are allowed and defining behavior on validation failure. */ variableValidation?: VariableValidationConfig; /** * Whether click-through (link) tracking is enabled for the workspace. * When false, the "Link tracking" toggle is disabled and forced off. * @default true */ linkTrackingEnabled?: boolean; hidePublish?: boolean; autoSave?: boolean; autoSaveDebounce?: number; brandEditor?: boolean; brandProps?: BrandEditorProps; /** @deprecated Use routing.channels instead. Will be removed in a future version. */ channels?: ChannelType[]; routing?: MessageRouting; colorScheme?: "light" | "dark"; /** * When true, makes the editor read-only across all channels. * Disables editing, toolbar actions, block insertion, drag-and-drop, and auto-save. * @default false */ readOnly?: boolean; /** * Sample data payload for validating loop data paths. * When provided, the editor will show warnings if a loop's data path * doesn't match a key in this object or doesn't resolve to an array. */ sampleData?: Record; /** * When true, the preview panel starts in desktop mode and hides its exit button. * @default false */ hidePreviewPanelExitButton?: boolean; /** * Locale code for preview rendering. * When set, locale translations from `node.locales[locale]` are applied * to the displayed content. Does not modify the stored content. */ locale?: string; } export declare const TemplateEditor: import("react").NamedExoticComponent;