import type { Editor } from "@tiptap/react"; import type { ElementalContent } from "@/types/elemental.types"; type ChannelType = "email" | "sms" | "push" | "inbox" | "slack" | "teams"; type TestChannelType = "email" | "sms" | "push" | "inbox" | "slack" | "msteams"; declare global { interface Window { __COURIER_CREATE_TEST__?: { editors: { email: Editor | null; sms: Editor | null; push: Editor | null; inbox: Editor | null; slack: Editor | null; teams: Editor | null; }; currentEditor: Editor | null; activeChannel: ChannelType | null; templateEditorContent: ElementalContent | null | undefined; /** * Programmatically set the template editor content. * This is used for testing API-based content updates. */ setTemplateEditorContent?: (content: ElementalContent | null) => void; /** * Get the current template editor content. * Useful for verifying content state in tests. */ getTemplateEditorContent?: () => ElementalContent | null | undefined; /** * Switch to a specific channel. * Used in E2E tests to programmatically change channels. */ setChannel?: (channel: TestChannelType) => void; /** * Get the current active channel. */ getChannel?: () => TestChannelType | null; }; } } /** * Initialize the test helper object on window. * This should only be used in test environments. */ export declare function initTestHelpers(): void; /** * Set the editor for a specific channel and mark it as the current active editor. * This should only be used in test environments. */ export declare function setTestEditor(channel: ChannelType, editor: Editor | null): void; /** * Get the current active editor for testing. * This should only be used in test environments. */ export declare function getTestEditor(): Editor | null; /** * Get the editor for a specific channel. * This should only be used in test environments. */ export declare function getTestEditorByChannel(channel: ChannelType): Editor | null; /** * Clear all test editors. * This should only be used in test environments. */ export declare function clearTestEditors(): void; export {};