import {Meta, StoryObj} from '@storybook/react';
import {COLORS} from '@shared/colors';

import Icon, {IconProps} from './index';
import {IconSize} from './interfaces';
import {ICON_MAP} from './constants';

const meta: Meta<typeof Icon> = {
  title: 'Icon',
  component: Icon,
  argTypes: {
    size: {control: 'radio', options: Object.keys(IconSize)},
    name: {control: 'select', options: Object.keys(ICON_MAP)},
    color: {control: 'color'},
  },
};

export const IconComponent: StoryObj<IconProps> = {
  args: {
    name: 'home',
    size: 'xxl',
    color: COLORS.PRIMARY,
  },
};

export default meta;
