"use client" import type { CertificateDto } from "@mmapp/contracts/certificates" import { cn } from "@/lib/utils" function daysLeftBar(days: number, total = 365): number { if (days <= 0) return 0 return Math.min(100, Math.round((days / total) * 100)) } function CertificateExpandedDetail({ cert }: { cert: CertificateDto }) { const pct = daysLeftBar(cert.daysLeft) return (

Key size

{cert.keySize} bit

Действителен с

{cert.validFrom}

SAN / Alt Names

{cert.sans.length > 0 ? cert.sans.map((s) => ( {s} )) : }

Trusted

{cert.trusted ? "Да (доверенный)" : "Нет (не доверенный)"}

) } export { CertificateExpandedDetail, daysLeftBar }