import React, { useState } from "react"; import { Button } from "@/components/ui/button"; import { Input } from "@/components/ui/input"; import { Dialog, DialogContent } from "@/components/ui/dialog"; import { cn } from "@/lib/utils"; import type { ResourceEmailEditorDialogProps } from "./types"; const EDITOR_CONTENT_TYPES = [ "Columns", "Button", "Divider", "Heading", "Paragraph", "Image", "Social", "Menu", "HTML", ] as const; /** * @deprecated Batch-send era — the Resource Center email editor is superseded * by the Email Marketing Hub editor (template editor with subject/category and * merge-tag reference). Removed at the next major. */ export function ResourceEmailEditorDialog({ open, onClose, onSave, editorSlot, }: ResourceEmailEditorDialogProps) { const [templateName, setTemplateName] = useState(""); function handleSave() { onSave(templateName); } function handleClose() { setTemplateName(""); onClose(); } return ( !v && handleClose()}> {/* Template name header */}

Template Name

setTemplateName(e.target.value)} className="border-none shadow-none px-0 text-body-medium h-auto focus-visible:ring-0 bg-transparent" />
{/* Editor area */}
{editorSlot ?? }
{/* Footer */}
); } /** Shown when no editorSlot is provided (e.g. in Storybook). */ function EditorPlaceholder() { return (
{/* Canvas */}

No content here. Drag content from right.

{/* Content sidebar */}
{(["Content", "Blocks", "Body"] as const).map((tab, i) => ( ))}
{EDITOR_CONTENT_TYPES.map((item) => (
{item}
))}
⚡ by Unlayer Editor
); }