// components/portal/SettingsSwitcher.tsx
"use client";
import { useRouter, useSearchParams } from "next/navigation";
import dynamic from "next/dynamic";
import { cn } from "@/lib/utils";
/**
* IMPORTANT:
* We dynamically import the existing settings pages so you do NOT have to move their contents.
* These imports point directly at your canonical routes:
* /app/settings/fiber/page.tsx
* /app/settings/uv/page.tsx
* /app/settings/co2-galvo/page.tsx
* /app/settings/co2-gantry/page.tsx
*
* If any of those filenames differ, update the paths below accordingly.
*/
const FiberPanel = dynamic(() => import("@/app/settings/fiber/page"), { ssr: false });
const UVPanel = dynamic(() => import("@/app/settings/uv/page"), { ssr: false });
const CO2GalvoPanel = dynamic(() => import("@/app/settings/co2-galvo/page"), { ssr: false });
const CO2GantryPanel = dynamic(() => import("@/app/settings/co2-gantry/page"), { ssr: false });
const TABS = [
{ key: "fiber", label: "Fiber" },
{ key: "uv", label: "UV" },
{ key: "co2-galvo", label: "CO₂ Galvo" },
{ key: "co2-gantry", label: "CO₂ Gantry" },
];
function Panel({ tab }: { tab: string }) {
switch (tab) {
case "fiber": return