import { Meta, StoryObj } from '@storybook/nextjs-vite'
import { EventPage as Event } from './Event'
import photo from "./lobpreis.jpeg"

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

type Story = StoryObj<typeof Event>;
export default meta

export const Default: Story = {
  args: {
    id: "testid",
    title: "Sing & Pray",
    date: "2024-12-02T09:21:19Z",
    createdAt: "2024-12-02T09:21:19Z",
    cancelled: false,
    recurrenceType: 'weekly',
    location: {
      id: "l1",
      name: "St. Richard",
      address: "Schudomastr 12\n12345 Berlin",
      createdAt: "",
      updatedAt: "",
    },
    description: 'Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum.' +
      'Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum.',
    shortDescription: 'Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. ',
    contact: {
      id: 'c1',
      createdAt: "",
      updatedAt: "",
      name: 'Pfr. A. Mustermann',
      email: "mail@pfarrei.com"
    },
  },
}

export const WithFlyer: Story = {
  args: {
    ...Default.args,
    flyer: {
      id: 'f1',
      updatedAt: "",
      createdAt: "",
      url: "http://"
    }
  }
}

export const WithGroup: Story = {
  args: {
    ...Default.args,
    group: 'some_group'
  }
}

export const WithFlyerAndGroup: Story = {
  args: {
    ...WithFlyer.args,
    group: "some_group"
  }
}

export const WithFlyerGroupAndRSVP: Story = {
  args: {
    ...WithFlyerAndGroup.args,
    rsvpLink: "https://disney.com"
  }
}

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

export const WithEndDateOnDifferentDay: Story = {
  args: {
    ...Default.args,
    date: "2024-12-02T13:00:00Z",
    endDateTime: "2024-12-04T14:00:00Z",
  },
}

export const WithOccurrences: Story = {
  args: {
    ...Default.args,
    upcomingOccurrences: [
      {
        id: 'o1',
        date: '2024-12-09T09:21:19Z',
        title: 'Sing & Pray',
        href: '/veranstaltungen/sing-and-pray-2',
        location: 'St. Richard',
        cancelled: false,
      },
      {
        id: 'o2',
        date: '2024-12-16T09:21:19Z',
        title: 'Sing & Pray',
        href: '/veranstaltungen/sing-and-pray-3',
        location: 'St. Richard',
        cancelled: true,
      },
      {
        id: 'o3',
        date: '2024-12-23T09:21:19Z',
        title: 'Sing & Pray',
        href: '/veranstaltungen/sing-and-pray-4',
        location: 'St. Richard',
        cancelled: false,
      },
      {
        id: 'o4',
        date: '2024-12-30T09:21:19Z',
        title: 'Sing & Pray',
        href: '/veranstaltungen/sing-and-pray-5',
        location: 'St. Richard',
        cancelled: false,
      },
    ],
  },
}

export const WithOccurrencesAndGroup: Story = {
  args: {
    ...WithOccurrences.args,
    group: 'some_group',
  },
}