import type { Meta, StoryObj } from '@storybook/react';

import { ActionMenu } from '.';

const meta: Meta<typeof ActionMenu> = {
  title: 'Components/ActionMenu',
  component: ActionMenu,
  argTypes: {},
};

export default meta;

type Story = StoryObj<typeof ActionMenu>;

export const Default: Story = {
  args: {},
  render: () => (
    <ActionMenu>
      <ActionMenu.Item onSelect={() => console.warn('Download')}>Download</ActionMenu.Item>
      <ActionMenu.Item className="danger" onSelect={() => console.warn('Delete')}>
        Delete
      </ActionMenu.Item>
    </ActionMenu>
  ),
};

export const XS: Story = {
  args: {},
  render: () => (
    <ActionMenu size="xs">
      <ActionMenu.Item onSelect={() => console.warn('Download')}>Download</ActionMenu.Item>
      <ActionMenu.Item className="danger" onSelect={() => console.warn('Delete')}>
        Delete
      </ActionMenu.Item>
    </ActionMenu>
  ),
};
