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

import Toast from './Toast';
import { ToastV2, ToastV2Props } from './ToastV2';

type PagePropsAndCustomArgs = ToastV2Props;

const meta: Meta<PagePropsAndCustomArgs> = {
  title: 'components/Toast',
  component: ToastV2,
};

export default meta;
type Story = StoryObj<PagePropsAndCustomArgs>;

export const Default: Story = {
  render: (args) => {
    return (
      <div>
        <ToastV2 status='info' {...args} />
        <ToastV2 status='success' {...args} />
        <ToastV2 status='error' {...args} />
      </div>
    );
  },
  args: {
    title: 'Toasty title',
    description: 'Toasty description',
  },
};

export const ToastV1: Story = {
  render: () => (
    <div>
      <Toast success={true} content='Toast content goes here' />
      <Toast success={false} content='Toast content goes here' />
    </div>
  ),
};
