"use client" import { useState } from "react" import { Users, Clock, UserPlus, Merge, Upload, Trash2, Plus, Tag, Menu, ChevronDown, } from "lucide-react" import { Button } from "@/components/ui/button" import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger, } from "@/components/ui/dropdown-menu" import { useContactsStore } from "@/lib/contacts/contacts-store" import { useNavStore } from "@/lib/stores/nav-store" import type { ContactsPageView } from "./contacts-app-shell" interface ContactsSidebarProps { currentView: ContactsPageView activeLabelId?: string | null onNavigate: (view: ContactsPageView) => void onCreateContact: () => void onBulkCreate?: () => void onSelectLabel?: (id: string) => void } export function ContactsSidebar({ currentView, activeLabelId, onNavigate, onCreateContact, onBulkCreate, onSelectLabel, }: ContactsSidebarProps) { const contacts = useContactsStore((s) => s.contacts) const mergeSuggestionCount = useContactsStore((s) => s.getMergeSuggestions().length) const labelRows = useNavStore((s) => s.labelRows) const addLabelRowFromSidebar = useNavStore((s) => s.addLabelRowFromSidebar) const [labelInput, setLabelInput] = useState("") const [showLabelInput, setShowLabelInput] = useState(false) const availableLabels = labelRows.filter((r) => r.enabled !== false) function handleAddLabel() { const trimmed = labelInput.trim() if (trimmed) { addLabelRowFromSidebar(trimmed) setLabelInput("") setShowLabelInput(false) } } return ( ) } function NavItem({ icon, label, count, badge, active, onClick, }: { icon: React.ReactNode label: string count?: number badge?: number active: boolean onClick: () => void }) { return ( ) }