import {createElement} from "../../_global/scripts/helpers";
import {createHeader} from "../../components/header/HeaderComponent";
import {createFooter} from "../../components/footer/FooterComponent";
import {createElectionForm} from "../../components/election-form/ElectionFormComponent";
import {createMagazineHeader} from "../../components/magazine-header/MagazineHeaderComponent";
import {createElectionResultList} from "../../sections/election-result-list/ElectionResultListComponent";
import {createSurvey} from "../../sections/survey/SurveyComponent";

export const createElectionOverviewPage = ({
  stageWithImage = false,
}) => {
  const page = createElement('div', ['page', 'header-collapsed']);
  const magazineHeader = createMagazineHeader({
    title: 'Eine starke Entscheidung',
    smalltext: 'IHK Musterstadt Wahl 2024',
    logo: './logos/magazine-header-flag.png',
  });

  page.appendChild(createHeader({}));
  page.appendChild(magazineHeader);

  const wrapper = createElement('div', ['page-wrapper'], null, page);
  const pageContent = createElement('div', ['page-content'], null, wrapper);
  const container = createElement('div', ['container'], null, pageContent);

  container.appendChild(createElectionForm({}));
  container.appendChild(createElectionResultList({}));

  container.appendChild(createSurvey({}));

  page.appendChild(createFooter({}))

  return page;
}