import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
import { useState } from "react";
import { Button } from "../../Button";
import { Modal } from "../Modal";
export const Default = {
    args: {
        title: "Modal title",
        children: "This is the modal content.",
        size: "md",
    },
    render: (args) => {
        const [open, setOpen] = useState(false);
        return (_jsxs(_Fragment, { children: [_jsx(Button, { onClick: () => setOpen(true), variant: "primary", children: "Open modal" }), _jsx(Modal, { title: args.title, size: args.size, open: open, onOpenChange: setOpen, children: args.children })] }));
    },
    parameters: {
        docs: {
            description: {
                story: "A basic modal component opened by a button.",
            },
        },
    },
};
const meta = {
    title: "Components/Modal",
    component: Modal,
    parameters: {
        layout: "centered",
        docs: {
            description: {
                component: "```tsx\nimport { Modal } from '@openuidev/react-ui';\n```",
            },
        },
        controls: {
            exclude: ["open", "onOpenChange"],
        },
    },
    argTypes: {
        title: {
            control: "text",
        },
        children: {
            control: "text",
        },
        size: {
            control: "radio",
            options: ["sm", "md", "lg"],
            table: {
                defaultValue: { summary: "md" },
            },
        },
        open: {
            control: false,
            table: {
                disable: true,
            },
        },
    },
    tags: ["autodocs", "!dev"],
};
export default meta;
//# sourceMappingURL=Modal.stories.js.map