import { Meta, Story } from '@storybook/react';
import React from 'react';
import {
  IRadioItems,
  IRadioProps,
  InputRadio,
} from '../../../components/RadioButton';
import {
  RPGUIContainer,
  RPGUIContainerTypes,
} from '../../../components/RPGUI/RPGUIContainer';
import { RPGUIRoot } from '../../../components/RPGUI/RPGUIRoot';

const meta: Meta = {
  title: 'UI/Buttons & Inputs/Radio Input',
  component: InputRadio,
};

export default meta;

const Template: Story<IRadioProps> = args => (
  <RPGUIRoot>
    <RPGUIContainer type={RPGUIContainerTypes.Framed}>
      <InputRadio {...args} />
    </RPGUIContainer>
  </RPGUIRoot>
);

export const Default = Template.bind({});

const items: IRadioItems[] = [
  {
    label: 'label1',
    value: 'value1',
  },
  {
    label: 'label2',
    value: 'value2',
  },
  {
    label: 'label3',
    value: 'value3',
  },
];

Default.args = {
  items,
  name: 'teste',
};
