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

import ToastWithButton from './toast.composition'
// More on how to set up stories at: https://storybook.js.org/docs/7.0/react/writing-stories/introduction
const meta = {
  title: 'Toast',
  component: ToastWithButton,
  tags: ['autodocs'],
  argTypes: {},
} satisfies Meta<typeof ToastWithButton>

export default meta
type Story = StoryObj<typeof meta>

// More on writing stories with args: https://storybook.js.org/docs/7.0/react/writing-stories/args
export const Simple: Story = {
  args: {
    title: '',
    description: 'Your message has been sent.',
    toastButtonLabel: ' Undo',
    buttonLabel: 'Show Toast',
    buttonVariant: 'outline',
  },
}
export const WithTitle: Story = {
  args: {
    title: 'Uh oh! Something went wrong.',
    description: 'There was a problem with your request.',
    buttonLabel: 'Show Toast',
  },
}

export const WithAction: Story = {
  args: {
    title: 'Uh oh! Something went wrong.',
    description: 'There was a problem with your request.',
    toastButtonLabel: 'Try again',
    buttonLabel: 'Show Toast',
  },
}

export const Destructive: Story = {
  args: {
    buttonVariant: 'destructive',
    title: 'Uh oh! Something went wrong.',
    description: 'There was a problem with your request.',
    toastButtonLabel: 'Try again',
    buttonLabel: 'Show Toast',
  },
}
