import type { TiptapDoc } from "@/lib/utils"; import type { ChannelType } from "@/store"; import type { ElementalNode } from "@/types/elemental.types"; import type { Node } from "@tiptap/pm/model"; import type { Editor } from "@tiptap/react"; import type { HTMLAttributes } from "react"; import { useEmailDocumentStyles } from "../../hooks/useEmailDocumentStyles"; import type { FontEntry } from "@/types/font.types"; import type { MessageRouting, TenantData } from "../../../Providers/store"; import { type VisibleBlockItem } from "../../store"; import type { TemplateEditorProps } from "../../TemplateEditor"; interface BrandSettingsData { brandColor?: string; textColor?: string; subtleColor?: string; headerStyle: "border" | "plain"; logo?: string; link?: string; facebookLink?: string; linkedinLink?: string; instagramLink?: string; mediumLink?: string; xLink?: string; } export interface EmailProps extends Pick, Omit, "value" | "onChange"> { /** * Extra loading gate, OR-ed with the editor's own template loading state. * A host that resolves data of its own before the canvas is faithful — a * brand, say — can hold the loading overlay up instead of showing a * half-styled preview. Passing `false` never hides the editor's own loading * state. * * The overlay only *covers* the canvas: children still mount, paint, measure * and fetch, so this hides a half-styled preview rather than deferring its * side effects. * * A gate held through this prop starts below the toolbar, leaving the channel * tabs, Publish button and any host controls interactive — unlike the editor's * own template load, which covers the toolbar too because nothing in it is * populated yet. * * The overlay is also not continuous: `Email` renders nothing at all during a * template transition with no content, so a host gate cannot rule out a flash * across a template switch. * * @default false */ isLoading?: boolean; headerRenderer?: ({ hidePublish, channels, routing, }: { hidePublish?: boolean; channels?: ChannelType[]; routing?: MessageRouting; }) => React.ReactNode; hidePreviewPanelExitButton?: boolean; fonts?: FontEntry[]; render?: ({ subject, handleSubjectChange, selectedNode, setSelectedNode, previewMode, templateEditor, ref, isBrandApply, brandSettings, items, content, syncEditorItems, brandEditorContent, templateData, togglePreviewMode, readOnly, emailBackgroundColor, emailContentBodyColor, handleEmailColorChange, emailFontFamily, handleFontFamilyChange, documentStyles, }: { subject: string | null; handleSubjectChange: (e: React.ChangeEvent) => void; selectedNode: Node | null; setSelectedNode: (node: Node | null) => void; previewMode: "desktop" | "mobile" | undefined; templateEditor: Editor | null; ref: React.RefObject | null; isBrandApply: boolean; brandSettings: BrandSettingsData | null; items: Items; content: TiptapDoc | null; syncEditorItems: (editor: Editor) => void; brandEditorContent: string | null; templateData: TenantData | null; togglePreviewMode: (mode: "desktop" | "mobile" | undefined) => void; hidePreviewPanelExitButton?: boolean; readOnly: boolean; emailBackgroundColor: string; emailContentBodyColor: string; handleEmailColorChange: (key: "background_color" | "content_body_color", value: string) => void; emailFontFamily: string; emailFallbackFont: string; handleFontFamilyChange: (fontFamily: string) => void; handleFallbackChange: (fallbackName: string) => void; /** Document-level Frame + base typography state (padding, font size, line height). */ documentStyles: ReturnType; }) => React.ReactNode; } type UniqueIdentifier = string | number; interface Items { Editor: UniqueIdentifier[]; Sidebar: VisibleBlockItem[]; } export declare const defaultEmailContent: ElementalNode[]; export declare const Email: import("react").MemoExoticComponent>>; export {};