"use client";

import LayoutProvider from "@/providers/layout.provider";
import LayoutContentProvider from "@/providers/content.provider";
import DashCodeSidebar from "@/components/partials/sidebar";
import DashCodeFooter from "@/components/partials/footer";
import ThemeCustomize from "@/components/partials/customizer";
import DashCodeHeader from "@/components/partials/header";

import { redirect } from "@/components/navigation";
import Footer from "@/components/landing-page/footer";
import Navbar from "@/components/landing-page/navbar";
import NavbarKaltara from "@/components/landing-page/landing-polda-kaltara/navbar-polda-kaltara";
import { useParams } from "next/navigation";
import ContactUsKaltara from "@/components/landing-page/landing-polda-kaltara/contact-us-kaltara";
import NewsTickerKaltara from "../../../tbnews/[polda_name]/components/news-tickers-kaltara";

const layout = ({ children }: { children: React.ReactNode }) => {
  const params = useParams();
  const poldaName: any = params?.polda_name;
  return poldaName === "kaltara" ? (
    <>
      <NavbarKaltara />
      {children}
      <ContactUsKaltara />
      <NewsTickerKaltara />
    </>
  ) : (
    <>
      <Navbar />
      {children}
      <Footer />
    </>
  );
};

export default layout;
