'use client';
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { LayoutList, Kanban, Table2, CalendarDays, BarChart3, GanttChart } from 'lucide-react';
import { cn } from '../../../lib/utils.js';
import { Button } from '../../ui/button.js';
const VIEW_OPTIONS = [
    { mode: 'list', label: 'List', icon: LayoutList },
    { mode: 'board', label: 'Board', icon: Kanban },
    { mode: 'table', label: 'Table', icon: Table2 },
    { mode: 'calendar', label: 'Calendar', icon: CalendarDays },
    { mode: 'timeline', label: 'Timeline', icon: GanttChart },
    { mode: 'analytics', label: 'Analytics', icon: BarChart3 },
];
export function ViewSwitcher({ activeView, onViewChange, className }) {
    return (_jsx("div", { "data-testid": "view-switcher", className: cn('inline-flex items-center rounded-md border p-0.5', className), children: VIEW_OPTIONS.map(({ mode, label, icon: Icon }) => (_jsxs(Button, { variant: activeView === mode ? 'secondary' : 'ghost', size: "sm", className: cn('h-6 gap-1 px-2 text-[10px]', activeView === mode && 'font-medium'), onClick: () => onViewChange(mode), "data-testid": `view-switch-${mode}`, children: [_jsx(Icon, { className: "h-3 w-3" }), label] }, mode))) }));
}
