// Shared icons + small UI helpers
const Icon = {
Dashboard: () => ,
Building: () => ,
Users: () => ,
Calendar: () => ,
Chart: () => ,
Doc: () => ,
Wrench: () => ,
Plus: () => ,
Search: () => ,
ChevronRight: () => ,
ChevronDown: () => ,
Upload: () => ,
Settings: () => ,
Address: () => ,
Mail: () => ,
Sparkle: () => ,
};
// Currency formatter
const fmtEUR = (n) => new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR', maximumFractionDigits: 0 }).format(n);
const fmtEUR2 = (n) => new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(n);
const fmtNum = (n) => new Intl.NumberFormat('de-DE').format(n);
const fmtDate = (s) => {
const d = new Date(s);
return d.toLocaleDateString('de-DE', { day: '2-digit', month: 'short', year: 'numeric' });
};
const fmtDateShort = (s) => {
const d = new Date(s);
return d.toLocaleDateString('de-DE', { day: '2-digit', month: '2-digit', year: '2-digit' });
};
function Pill({ children, tone = "default" }) {
return (
{children}
);
}
function StatusPill({ status }) {
if (status === "vermietet") return Vermietet;
if (status === "leerstand") return Leerstand;
if (status === "kündigung") return Kündigung;
return {status};
}
Object.assign(window, { Icon, fmtEUR, fmtEUR2, fmtNum, fmtDate, fmtDateShort, Pill, StatusPill });