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

import { Textarea, InputLabel } from '@/components/inputs';

const meta: Meta<typeof Textarea> = {
  component: Textarea,
};

export default meta;

type TStory = StoryObj<typeof Textarea>;

export const WithLabel: TStory = {
  args: {
    id: 'textarea',
    name: 'Textarea',
    theme: 'light',
    placeholder: 'Description',
    disabled: false,
    error: false,
    onChange: value => {
      console.log(value);
    },
  },
  decorators: [
    // eslint-disable-next-line @typescript-eslint/naming-convention
    TStory => (
      <>
        <InputLabel id="left" className="mb-2">
          Textarea
        </InputLabel>
        <TStory />
      </>
    ),
  ],
};
