"use client" import { DataGridContainer, DataGridScrollArea, DataGridTable, dataGridFeatures, type DataGridFeatures } from "@/components/reui/data-grid" import { useMemo, useEffect, type ReactNode } from "react" import { type ColumnDef, useTable, } from "@tanstack/react-table" import type { Server } from "@/lib/data" import type { CertificateView } from "@/lib/certificate-view" import { CertDaysCell } from "@/components/data-grids/certificate-days-cell" import { Button } from "@/components/ui/button" import { Flag } from "@/components/flag" import { cn } from "@/lib/utils" import { DataGridShell } from "@/components/data-grids/shared/data-grid-shell" import { DATA_GRID_CELL_PAD, DATA_GRID_CELL_PAD_FIRST, DATA_GRID_CELL_PAD_LAST, DEFAULT_DATA_GRID_LAYOUT, } from "@/components/data-grids/shared/data-grid-layout" import { DataGridSortHeader } from "@/components/data-grids/shared/data-grid-sort-header" import { CertificateExpandedDetail, } from "@/components/data-grids/certificate-expanded-detail" import { EmptyState } from "@/components/empty-state" import { BadgeCheckIcon, ChevronDownIcon, ChevronRightIcon, ServerIcon, ShieldAlertIcon, ShieldCheckIcon, ShieldOffIcon, CircleHelpIcon, } from "lucide-react" const STATUS_CONFIG: Record< CertificateView["status"], { label: string; icon: ReactNode; badge: string; row: string } > = { unknown: { label: "Неизвестен", icon: