"use client";

import { type ReactNode } from "react";

import Header from "./Header";
import Footer from "./Footer";
import { useModal } from "../../lib/modal-system/ModalContext";

type ModalType =
  | "login"
  | "signup"
  | "forgot"
  | "email"
  | "reset"
  | "success"
  | null;

interface SiteLayoutProps {
  children: ReactNode;
}

const modalMaxWidth: Partial<Record<NonNullable<ModalType>, string>> = {
  success: "max-w-[452px] !p-10",
};

export default function SiteLayout({ children }: SiteLayoutProps) {
  const { openModal } = useModal();
  return (
    <>
      <Header
        onSignIn={() => {
          openModal("LOGIN", {});
        }}
      />
      {children}
      <Footer />
    </>
  );
}
