import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
import { useState } from 'react';
import Button from '../../../design-system/Buttons/Button';
import ImagePreviewDialog from '.';
const meta = {
    component: ImagePreviewDialog,
    title: 'Composed Components/Files/ImagePreviewDialog',
    tags: ['autodocs'],
    argTypes: {
        open: { control: false },
        onClose: { control: false },
        onDownload: { control: false },
        src: { control: 'text' },
        name: { control: 'text' },
        alt: { control: 'text' },
        showDownload: { control: 'boolean' },
    },
    args: {
        name: 'preview.jpg',
        src: 'https://images.unsplash.com/photo-1469474968028-56623f02e42e?q=80&w=2074&auto=format&fit=crop',
        showDownload: true,
    },
};
export default meta;
export const Default = {
    render: args => {
        const [open, setOpen] = useState(false);
        return (_jsxs(_Fragment, { children: [_jsx(Button, { variant: "primary", onClick: () => setOpen(true), children: "Open preview" }), _jsx(ImagePreviewDialog, { ...args, open: open, onClose: () => setOpen(false) })] }));
    },
};
