import type { Meta, StoryObj } from '@storybook/react-vite'
import { fn } from 'storybook/test'
import { BookingCodeChip } from './index'

const meta = {
  title: 'Components/BookingCodeChip',
  component: BookingCodeChip,
  parameters: {
    layout: 'centered',
  },
} satisfies Meta<typeof BookingCodeChip>

export default meta
type Story = StoryObj<typeof BookingCodeChip>

export const Default: Story = {
  args: {},
  render: () => <BookingCodeChip bookingCode="ABC123" withText />,
}

export const WithoutText: Story = {
  args: {},
  render: () => <BookingCodeChip bookingCode="ABC123" withText={false} />,
}

export const FilledIcon: Story = {
  args: {},
  render: () => <BookingCodeChip bookingCode="ABC123" filledIcon />,
}

export const Unavailable: Story = {
  args: {},
  render: () => <BookingCodeChip bookingCode="ABC123" isUnavailable />,
}

export const AlignCenter: Story = {
  args: {},
  render: () => <BookingCodeChip bookingCode="ABC123" alignCenter />,
}

export const WithCloseButton: Story = {
  args: {},
  render: () => (
    <BookingCodeChip bookingCode="ABC123" withCloseButton onClose={fn} />
  ),
}

export const CampaignBreakfastIncluded: Story = {
  args: {},
  render: () => (
    <BookingCodeChip isCampaign bookingCode="SUMMER25" isBreakfastIncluded />
  ),
}

export const CampaignBreakfastExcluded: Story = {
  args: {},
  render: () => (
    <BookingCodeChip
      isCampaign
      bookingCode="SUMMER25"
      isBreakfastIncluded={false}
    />
  ),
}

export const CampaignFilledIcon: Story = {
  args: {},
  render: () => (
    <BookingCodeChip
      isCampaign
      bookingCode="SUMMER25"
      isBreakfastIncluded
      filledIcon
    />
  ),
}
