import { jsx as _jsx } from "react/jsx-runtime";
import { useArgs } from "@storybook/preview-api";
import { useCallback } from "react";
import { DangerZone } from "./danger-zone.js";
const meta = {
    title: "Connect/Components/SettingsModalV2/Danger Zone",
    component: DangerZone,
};
export default meta;
export const Default = {
    args: {
        drives: [
            {
                header: {
                    id: "1",
                    name: "Drive 1",
                },
            },
            {
                header: {
                    id: "2",
                    name: "Drive 2",
                },
            },
        ],
        onDeleteDrive: () => { },
        onClearStorage: () => { },
    },
    render: function Wrapper(args) {
        const [, setArgs] = useArgs();
        const onClearStorage = useCallback(() => {
            alert("You cleared the storage. Good for you.");
        }, []);
        const onDeleteDrive = useCallback((drive) => {
            setArgs({
                drives: args.drives.filter((d) => d.header.id !== drive.header.id),
            });
        }, [args.drives, setArgs]);
        return (_jsx(DangerZone, { ...args, onClearStorage: onClearStorage, onDeleteDrive: onDeleteDrive }));
    },
};
//# sourceMappingURL=danger-zone.stories.js.map