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

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

const meta: Meta<typeof ContactSectionView> = {
  component: ContactSectionView,
}

type Story = StoryObj<typeof ContactSectionView>
export default meta

export const Default: Story = {
  args: {
    title: 'Kontakt',
    description:
      'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce vel dolor semper, consectetur augue quis, elementum tellus. Nulla ut porta lorem. Nulla posuere quam nisi, ut porttitor diam dignissim eget. Morbi imperdiet et lectus quis dapibus. Cras sollicitudin est augue, vel rhoncus massa elementum vitae. Donec sagittis pulvinar nibh ultrices tincidunt. Interdum et malesuada fames ac ante ipsum primis in faucibus.',
    form: <ContactFormView action={noopAction} />,
  },
}
