import { Meta, StoryObj } from '@storybook/nextjs-vite'
import { ContactFormView, ContactFormState } from './ContactFormView'

const noopAction = async (): Promise<ContactFormState> => ({
  message: 'Storybook: form submission is a no-op.',
})

const meta: Meta<typeof ContactFormView> = {
  component: ContactFormView,
  args: {
    action: noopAction,
  },
}

type Story = StoryObj<typeof ContactFormView>
export default meta

export const Default: Story = {
  args: {
    schema: 'base',
  },
}

export const Schema: Story = {
  args: {
    schema: 'contrast',
  },
}
