// Alba Cars — UI primitives (logo, crest, icons, small components)
// Lion crest SVG — original simplified heraldic mark (NOT a copy of the photographed shield).
// Stylized lion rampant on shield with gold rim.
function AlbaCrest({ size = 32, mono = false }) {
const red = mono ? 'currentColor' : '#9E1B1B';
const gold = mono ? 'currentColor' : '#C8A35A';
const white = mono ? '#fff' : '#fff';
return (
);
}
function AlbaLogo({ theme = 'dark', size = 'md' }) {
const sizes = { sm: { crest: 26, text: 16, gap: 9 }, md: { crest: 32, text: 19, gap: 11 }, lg: { crest: 44, text: 26, gap: 14 } };
const s = sizes[size] || sizes.md;
const textColor = theme === 'dark' ? '#fff' : 'var(--ink)';
return (
);
}
// Tiny icon set — geometric, monoline
function Icon({ name, size = 18, stroke = 1.6 }) {
const p = { width: size, height: size, viewBox: '0 0 24 24', fill: 'none', stroke: 'currentColor', strokeWidth: stroke, strokeLinecap: 'round', strokeLinejoin: 'round' };
switch (name) {
case 'arrow-right': return ;
case 'arrow-up-right': return ;
case 'arrow-left': return ;
case 'check': return ;
case 'phone': return ;
case 'whatsapp': return ;
case 'mail': return ;
case 'pin': return ;
case 'search': return ;
case 'menu': return ;
case 'x': return ;
case 'shield': return ;
case 'gauge': return ;
case 'cog': return ;
case 'fuel': return ;
case 'door': return ;
case 'transmission': return ;
case 'doc': return ;
case 'truck': return ;
case 'sparkle': return ;
case 'play': return ;
case 'globe': return ;
case 'instagram': return ;
case 'facebook': return ;
case 'youtube': return ;
case 'tiktok': return ;
case 'plus': return ;
case 'minus': return ;
case 'heart': return ;
case 'share': return ;
case 'filter': return ;
case 'calendar': return ;
case 'star': return ;
case 'chevron-down': return ;
case 'chevron-right': return ;
default: return null;
}
}
function Pill({ children, live, dot, className = '' }) {
return (
{(dot || live) && }
{children}
);
}
function Eyebrow({ children }) {
return {children};
}
function Btn({ children, variant = 'primary', icon, onClick, href, type, style }) {
const cls = `btn btn-${variant}`;
const inner = <>{children}{icon && }>;
if (href) return {inner};
return ;
}
// Section header
function SectionHead({ eyebrow, title, sub, align = 'left', actions }) {
return (
{eyebrow &&
{eyebrow}
}
{title}
{sub &&
{sub}
}
{actions &&
{actions}
}
);
}
// Trust strip — a small row of trust items
function TrustStrip({ inverted = false, dense = false }) {
const items = [
{ icon: 'shield', label: '150+ Point Inspection', sub: 'On every car' },
{ icon: 'check', label: 'RTA Certified', sub: 'In-house transfer' },
{ icon: 'sparkle', label: '1-Year Free Warranty', sub: 'Included' },
{ icon: 'doc', label: 'Bank Paperwork', sub: 'Handled by us' },
{ icon: 'truck', label: 'UAE-Wide Delivery', sub: 'Door to door' },
];
return (
{items.map((it, i) => (
))}
);
}
// WhatsApp floating button — bottom right
function WhatsAppFab() {
return (
e.currentTarget.style.transform = 'scale(1.08)'}
onMouseLeave={(e) => e.currentTarget.style.transform = 'scale(1)'}
>
);
}
Object.assign(window, {
AlbaCrest, AlbaLogo, Icon, Pill, Eyebrow, Btn, SectionHead, TrustStrip, WhatsAppFab,
});