import { cn } from "@/lib/utils" import { m } from "framer-motion" import { useTranslation } from "react-i18next" export default function TabSwitch({ tabs, currentTab, setCurrentTab }: { tabs: string[]; currentTab: string; setCurrentTab: (tab: string) => void }) { const { t } = useTranslation() const customBackgroundImage = // @ts-expect-error CustomBackgroundImage is a global variable (window.CustomBackgroundImage as string) !== "" ? window.CustomBackgroundImage : undefined return (
{tabs.map((tab: string) => (
setCurrentTab(tab)} className={cn( "relative cursor-pointer rounded-3xl px-2.5 py-[8px] text-[13px] font-[600] transition-all duration-500", currentTab === tab ? "text-black dark:text-white" : "text-stone-400 dark:text-stone-500", )} > {currentTab === tab && ( )}

{t("tabSwitch." + tab)}

))}
) }