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

import Tooltip from '.';

const meta: Meta<typeof Tooltip> = {
  component: Tooltip,
  title: 'Design System/Tooltip',
  tags: ['autodocs'],
  argTypes: {
    title: { control: 'text' },
    description: { control: 'text' },
    direction: {
      control: 'radio',
      options: ['top', 'left', 'right', 'bottom'],
      table: { defaultValue: { summary: 'top' } },
    },
    disableTooltip: { control: 'boolean' },
    delay: { control: 'number' },
    open: { control: 'boolean' },
    followCursor: { control: 'boolean' },
    children: { control: false },
    sx: { control: false },
    slotProps: { control: false },
  },
};

export default meta;

type Story = StoryObj<typeof Tooltip>;

export const Default: Story = {
  args: {
    title: 'Title',
    description: 'Description',
    direction: 'top',
    children: <IconInfoCircle color="red" />,
  },
};
