"use client";

import { SectionEditor } from "../_components/SectionEditor";
import { InputField, TextareaField } from "../_components/FormField";

interface MetaData {
  title: string;
  description: string;
}

export default function MetaEditorPage() {
  return (
    <SectionEditor<MetaData> sectionKey="meta" title="SEO / Мета">
      {(data, update) => (
        <>
          <InputField
            label="Заголовок сайта (title)"
            value={data.title}
            onChange={(v) => update({ ...data, title: v })}
          />
          <TextareaField
            label="Описание (description)"
            value={data.description}
            onChange={(v) => update({ ...data, description: v })}
            rows={3}
          />
        </>
      )}
    </SectionEditor>
  );
}
