import type { ElementalContent, ElementalNode } from "@/types/elemental.types"; /** * Extract plain text from an ElementalNode, handling both simple format ({ content: "..." }) * and rich format ({ elements: [{ type: "string", content: "..." }, ...] }). * The rich format is produced by convertTiptapToElemental for heading/paragraph nodes. */ export declare function extractPlainTextFromNode(element: ElementalNode): string; /** * Cleans an Inbox element by removing styling properties from text and action elements. */ export declare function cleanInboxElements(elements: ElementalNode[]): ElementalNode[]; /** * Cleans Push elements by removing styling properties from text elements. * Handles both simple format ({ content: "..." }) and rich format ({ elements: [...] }). */ export declare function cleanPushElements(elements: ElementalNode[]): ElementalNode[]; /** * Cleans SMS elements by removing styling properties from text elements. */ export declare function cleanSMSElements(elements: ElementalNode[]): ElementalNode[]; /** * Cleans the entire template content by applying Inbox cleaning logic to all Inbox channels. */ export declare function cleanTemplateContent(content: ElementalContent): ElementalContent; /** * Determines how the subject/title was originally stored in a template * Returns "raw" if stored in channel.raw.subject/title, "meta" if stored in meta element */ export declare function getSubjectStorageFormat(content: ElementalContent | null | undefined, channelName: string): "raw" | "meta" | "none"; /** * Creates the appropriate subject/title storage structure based on the detected format. * For Push, SMS, and Inbox channels, uses elements array. */ export declare function createTitleUpdate(originalContent: ElementalContent | null | undefined, channelName: string, newTitle: string, elementalNodes: ElementalNode[]): { elements: ElementalNode[]; raw?: { subject?: string; title?: string; text?: string; }; }; /** * Helper to extract the current title from a channel element regardless of storage format */ export declare function extractCurrentTitle(channelElement: ElementalNode | undefined, channelName: string): string;