import { type Meta, type StoryObj } from '@storybook/react-vite';
import { IconAlertTriangle } from '@tabler/icons-react';

import FileItem from './index';

const meta: Meta<typeof FileItem> = {
  component: FileItem,
  title: 'Composed Components/Files/FileItem',
  tags: ['autodocs'],
  args: {
    file: {
      name: 'archivo.pdf',
      size: 5000,
    },
    actions: [
      {
        title: 'Download',
        onClick: () => alert('Download action'),
      },
      {
        title: 'Edit',
        onClick: () => alert('Edit action'),
      },
    ],
  },
};

export default meta;

type Story = StoryObj<typeof FileItem>;

export const Default: Story = {
  args: {},
};

export const StartContent: Story = {
  args: {
    startContent: <IconAlertTriangle />,
  },
};
