import { Check, ChevronsUpDown, ExternalLink } from "lucide-react"; import Link from "next/link"; import { useState } from "react"; import type { FileMetadataWithAdmin } from "~/server/services/storage.service"; import { api } from "~/utils/api"; import { ExtIcon } from "../area-riservata/allegati"; import { Button } from "../ui/button"; import { Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, } from "../ui/command"; import { Label } from "../ui/label"; import { Popover, PopoverContent, PopoverTrigger } from "../ui/popover"; export const DocInfo = ({ storageId, children, }: { storageId: string; children: React.ReactNode; }) => { const { data: file_info } = api.storage.getFileInfos.useQuery({ storageId, }); if (!file_info) return null; return (