import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { Button } from "../../../components/atoms/Button";
import { Text } from "../../../components/atoms/Text";
import { Card } from "../../../components/atoms/Card";
import { Breadcrumbs } from "../../../components/organisms/Breadcrumbs";
import { cn } from "../../../utils/cn";
export const FormPage = ({ title, breadcrumbs, children, onSubmit, onCancel, submitLabel = "Save", cancelLabel = "Cancel", loading = false, className, }) => {
    return (_jsxs("div", { className: cn("w-full", className), children: [_jsxs("div", { className: "mb-6", children: [breadcrumbs && breadcrumbs.length > 0 && (_jsx(Breadcrumbs, { items: breadcrumbs, className: "mb-4" })), _jsxs("div", { className: "flex items-center justify-between", children: [_jsx(Text, { variant: "h1", children: title }), _jsxs("div", { className: "flex gap-2", children: [onCancel && (_jsx(Button, { variant: "outline", onClick: onCancel, children: cancelLabel })), onSubmit && (_jsx(Button, { variant: "primary", onClick: onSubmit, disabled: loading, children: loading ? "Saving..." : submitLabel }))] })] })] }), _jsx(Card, { padding: "lg", children: children })] }));
};
export default FormPage;
