"use client"; import { ActionButtonWithTooltip } from "@/components/ui/action-button"; import { ButtonWithTooltip } from "@/components/ui/button"; import LoadingSpinner from "@/components/ui/spinner"; import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow, } from "@/components/ui/table"; import { toast } from "@/components/ui/use-toast"; import { api } from "@/lib/trpc"; import { Check, KeyRound, Pencil, Trash, FilePlus, X } from "lucide-react"; import { useSession } from "next-auth/react"; import AddLabelDialog from "./AddLabelDialog"; import EditLabelDialog from "./EditLabelDialog"; export default function LabelsView() { const { data: session } = useSession(); const { data: labels } = api.labels.list.useQuery(); const { data: labelStats } = api.labels.labelStats.useQuery(); const LabelsTable = ({ labels }) => (