import { popupOverlayStyle, popupSurfaceStyle } from '../lib/popupStyles'; import PageLoader from './PageLoader'; export const POPUP_FIELD_LABEL = { fontSize: 11, fontWeight: 500, color: 'var(--text-secondary)', textTransform: 'uppercase', letterSpacing: 0.8, display: 'block', marginBottom: 4, }; export default function InvoiceDetailPopup({ title, subtitle, headerRight, onClose, blockClose = false, metaContent, // JSX fields rendered in flat meta grid (no cards) metaActions, // optional JSX rendered right-aligned beside meta grid (e.g. Edit Dates) metaCols = 4, // number of grid columns for meta strip footerActions, loading = false, children, }) { return (
{ if (!blockClose) onClose?.(); }}>
e.stopPropagation()} > {/* Header */}
{title}
{subtitle &&
{subtitle}
}
{headerRight &&
{headerRight}
}
{/* Flat meta strip */} {metaContent && (
{metaContent}
{metaActions && (
{metaActions}
)}
)} {/* Body */} {loading ? (
) : (
{children}
)} {/* Footer */} {footerActions && (
{footerActions}
)}
); }