import React from 'react';
import {Meta, StoryObj} from '@storybook/react';
import {IconHome} from '@tabler/icons-react-native';

import {IconButton as IconButtonComponent} from './index';

type Story = StoryObj<typeof IconButtonComponent>;

const meta: Meta<typeof IconButtonComponent> = {
  title: 'HuGo/Buttons/IconButton',
  component: IconButtonComponent,
  argTypes: {
    variant: {control: 'radio', options: ['primary', 'secondary', 'tertiary']},
    size: {control: 'radio', options: ['lg', 'sm']},
    disabled: {control: 'boolean'},
  },
};

export const IconButton: Story = {
  args: {
    variant: 'primary',
    size: 'lg',
    disabled: false,
  },
  render: ({Icon = IconHome, ...props}) => (
    <IconButtonComponent Icon={Icon} {...props} />
  ),
};

export default meta;
