'use client' import { useState } from 'react' export function ApiTemplateEditor({ template, saving, onSave, onPreview, }: { template: { id: string; template_key: string; subject: string; body: string; language: string; is_active: boolean } saving: boolean onSave: (subject: string, body: string) => void onPreview: (subject: string, body: string) => void }) { const [subject, setSubject] = useState(template.subject) const [body, setBody] = useState(template.body) const [expanded, setExpanded] = useState(false) return (
{subject}