import {createElement, createSidebarPage} from "../../_global/scripts/helpers";
import {lorem1, lorem2} from "../../_global/scripts/lorem";
import {createContact} from "../../components/contact/ContactComponent";
import {OrganisationContactData, SingleContactData} from "../../components/contact/ContactData";
import {createAccordion} from "../../components/accordion/AccordionComponent";
import {AccordionData, EventAccordionData} from "../../components/accordion/AccordionData";
import {createAnchorLinks} from "../../components/anchor-links/AnchorLinksComponent";
import {createPrintShare} from "../../components/print-share/PrintShareComponent";

export const createEventPage = ({

                                }) => {
  const page = createSidebarPage({breadcrumb: ['Start', 'Veranstaltungsdetails']});
  const main = page.main;
  const aside = page.aside;

  createElement('span', ['kicker'], 'IHK Musterstadt', main);
  createElement('h1', [], 'Droht die Insolvenz? Individuelle Krisenberatung', main);
  main.appendChild(createAnchorLinks({
    titles: ['Veranstaltungsdetails', 'Termine, Veranstaltungsorte und Referenten', 'Weitere Informationen', 'Veranstalter'],
  }))

  createElement('h2', [], 'Veranstaltungsdetails', main);
  createElement('p', [], lorem1, main);

  main.appendChild(createAccordion({
    type: 'event',
    title: 'Termine, Veranstaltungsort und Referenten',
    items: EventAccordionData,
  }));

  createElement('div', ['like-h2'], 'Weitere Informationen', main);
  createElement('p', [], lorem2, main);

  main.appendChild(createContact({
    headline: 'Veranstalter',
    contacts: OrganisationContactData,
    addContainer: false,
  }))

  main.appendChild(createPrintShare({}));

  aside.appendChild(createContact({headline: 'Kontakt', contacts: SingleContactData}));

  return page.page;
}
