import { Outlet } from "react-router-dom";
import AdditionalPurchasesSteps from "./components/AdditionalPurchasesSteps";
import styles from "./styles.module.css";
import { steps } from "@/data/additionalPurchases";
import Header from "../../components/Header";

function AdditionalPurchases() {
  const activeStep = steps.findIndex((value) =>
    window.location.href.includes(value.link)
  );

  return (
    <section className={`${styles.page} page`}>
      <Header className={styles.header} />
      <AdditionalPurchasesSteps steps={steps} activeStep={activeStep} />
      <Outlet />
    </section>
  );
}

export default AdditionalPurchases;
