import type { FormEvent, ReactNode } from "react";
import type { Library } from "@/api/types";
import { Button } from "@/components/ui/button";
import { AdvancedFields, FolderFields, GeneralFields, MetadataFields } from "./LibraryFormSections";
import { useLibraryForm } from "./useLibraryForm";
export interface LibraryFormProps {
library: Library | null;
chapterThumbnailsSupported: boolean;
onClose?: () => void;
onSaved?: (library: Library) => void;
resetAfterCreate?: boolean;
submitLabel?: string;
savingLabel?: string;
}
function FormSection({ title, children }: { title: string; children: ReactNode }) {
return (
{title}
{children}