"use client"; import { cn } from "@/lib/utils"; import { motion } from "framer-motion"; import { useTranslations } from "next-intl"; import React from "react"; export default function TabSwitch({ tabs, currentTab, setCurrentTab, }: { tabs: string[]; currentTab: string; setCurrentTab: (tab: string) => void; }) { const t = useTranslations("TabSwitch"); 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(tab)}

))}
); }