import type { ReactNode } from "react"; import { useBook } from "../store/useBook"; import type { TrimSize } from "../model/book"; import { Icon } from "./Icon"; const TRIMS: { value: TrimSize; label: string }[] = [ { value: "6x9", label: "6 × 9 in — trade paperback" }, { value: "5.5x8.5", label: "5.5 × 8.5 in — digest" }, { value: "5x8", label: "5 × 8 in — pocket" }, { value: "a5", label: "A5 — 148 × 210 mm" }, ]; const LANGUAGES = [ { value: "en", label: "English" }, { value: "es", label: "Spanish" }, { value: "fr", label: "French" }, { value: "de", label: "German" }, { value: "it", label: "Italian" }, { value: "pt", label: "Portuguese" }, ]; function Field({ label, children }: { label: string; children: ReactNode }) { return ( ); } export function Settings({ onClose, onSave }: { onClose: () => void; onSave: () => void }) { const book = useBook((s) => s.book); const setMetadata = useBook((s) => s.setMetadata); const setSettings = useBook((s) => s.setSettings); if (!book) return null; const { metadata, settings } = book; return (