// MyAirSpace — Account dashboard. List of the resident's certificates.
const { Button, Card, Badge, Seal } = window.MyAirSpace || {};
const Icon = window.MyAirSpaceIcon;
function useVP() { const g = () => (typeof window === "undefined" ? 1180 : window.innerWidth); const [w, setW] = React.useState(g); React.useEffect(() => { const o = () => setW(g()); window.addEventListener("resize", o); return () => window.removeEventListener("resize", o); }, []); return w; }
const CERTS = [
{ id: "MAS-4F2K-8WMT", addr: "14 Rodwell Avenue, Weymouth", postcode: "DT4 8QT", issued: "18 Jun 2026", expires: "18 Jun 2027", status: "active" },
{ id: "MAS-2B8P-3ESP", addr: "Flat 5, 8 The Esplanade, Weymouth", postcode: "DT4 7AA", issued: "02 Mar 2026", expires: "02 Mar 2027", status: "active" },
{ id: "MAS-9XQ1-7PRT", addr: "3 Portland Road, Weymouth", postcode: "DT5 1AH", issued: "11 Jun 2025", expires: "11 Jun 2026", status: "expired" },
];
function Sidebar({ active = "certificates", mobile }) {
const items = [
["certificates", "file-text", "My certificates", "index.html"],
["account", "user", "Account details", "details.html"],
["billing", "credit-card", "Billing & receipts", "billing.html"],
["help", "life-buoy", "Help & support", "help.html"],
];
const links = items.map(([key, icon, label, href]) => {
const on = key === active;
return (