import type { Meta, StoryObj } from '@storybook/react-vite'
import { expect } from 'storybook/test'

import { AppShellSkeleton, FormSkeleton, ListSkeleton } from './skeletons'

const meta = {
  component: ListSkeleton,
  tags: ['ai-generated'],
} satisfies Meta<typeof ListSkeleton>

export default meta
type Story = StoryObj<typeof meta>

export const List: Story = {
  render: () => <ListSkeleton rows={4} />,
  play: async ({ canvas }) => {
    await expect(canvas.getByRole('status')).toBeInTheDocument()
  },
}

export const Form: Story = { render: () => <FormSkeleton /> }

export const AppShellLoading: Story = { render: () => <AppShellSkeleton /> }
