'use client'; import Link from 'next/link'; import { usePathname, useSearchParams } from 'next/navigation'; import { Clock3, ListTodo } from 'lucide-react'; import { pickAppText } from '@/lib/i18n/core'; import { useAppI18n } from '@/lib/i18n/provider'; import { cn } from '@/lib/utils'; const TASK_MANAGEMENT_TABS = [ { label: 'ordinary', href: '/tasks', icon: ListTodo, match: (pathname: string, tab: string | null) => pathname.startsWith('/tasks') && tab !== 'scheduled', }, { label: 'scheduled', href: '/tasks?tab=scheduled', icon: Clock3, match: (pathname: string, tab: string | null) => pathname.startsWith('/tasks') && tab === 'scheduled', }, ] as const; export function TaskManagementTabs() { const { locale } = useAppI18n(); const pathname = usePathname(); const searchParams = useSearchParams(); const activeTab = searchParams.get('tab'); return (