import { Meta, StoryObj } from '@storybook/nextjs-vite'
import portrait from '../ContactPerson2/portrait.jpeg'
import { ContactPersonCard } from './ContactPersonCard'

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

type Story = StoryObj<typeof ContactPersonCard>
export default meta

export const Default: Story = {
  args: {
    contact: {
      id: 'some_id',
      name: 'Pfr. M. Mustermann',
      role: 'Pfarrer',
      email: 'm.mustermann@drei-koenige-berlin.de',
      telephone: '+49 30 1234567',
      createdAt: '2021-03-01T00:00:00.000Z',
      updatedAt: '2021-03-01T00:00:00.000Z',
    },
  },
}

export const WithPhoto: Story = {
  args: {
    ...Default.args,
    photo: portrait,
  },
}

export const MinimalWithPhoto: Story = {
  args: {
    contact: {
      id: 'some_id',
      name: 'Pfr. M. Mustermann',
      createdAt: '2021-03-01T00:00:00.000Z',
      updatedAt: '2021-03-01T00:00:00.000Z',
    },
    photo: portrait,
  },
}

export const NullContact: Story = {
  args: {
    contact: null,
  },
}

export const StringContact: Story = {
  args: {
    contact: 'some_id_string',
  },
}