import type { ReactNode } from 'react'; import { Download, ExternalLink, Loader2, X } from 'lucide-react'; import { Button } from '@/components/ui/button'; import { downloadPdf, usePdfUrl } from './useInvoiceShelfData'; // The right-hand detail pane for invoices, estimates and payments — upstream's document view, which is // itself just a PDF iframe with an action bar over it. // // The PDF is fetched as a blob and handed to the iframe as an object URL rather than being pointed at the // API path directly. It has to be: the sidecar sits behind Officer's bearer auth and an