/* Shared line-icon set for module/feature cards. */
const PATHS = {
    /* ── Modules ── */
    bolt:     '<path d="M13 2 4 14h6l-1 8 9-12h-6Z"/>',
    cart:     '<path d="M3 4h2l2.4 12.2a1 1 0 0 0 1 .8h8.7a1 1 0 0 0 1-.8L21 7H6"/><circle cx="9" cy="20" r="1.4"/><circle cx="18" cy="20" r="1.4"/>',
    clock:    '<circle cx="12" cy="12" r="9"/><path d="M12 7v5l3 2"/>',
    box:      '<path d="M21 16V8l-9-5-9 5v8l9 5Z"/><path d="m3.3 7 8.7 5 8.7-5"/>',
    gift:     '<rect x="3" y="8" width="18" height="13" rx="1"/><path d="M3 12h18M12 8v13"/><path d="M12 8 8.6 4.6a2.4 2.4 0 1 1 3.4 0 2.4 2.4 0 1 1 3.4 0Z"/>',
    bell:     '<path d="M18 9a6 6 0 1 0-12 0c0 7-3 8-3 8h18s-3-1-3-8"/><path d="M10.5 21a2 2 0 0 0 3 0"/>',
    phone:    '<rect x="6" y="2" width="12" height="20" rx="3"/><path d="M11 18h2"/>',
    heart:    '<path d="M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z"/>',
    compare:  '<path d="M7 4v16M7 4 4 7M7 4l3 3M17 20V4M17 20l-3-3M17 20l3-3"/>',
    eye:      '<path d="M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7-10-7-10-7Z"/><circle cx="12" cy="12" r="3"/>',
    swatch:   '<path d="M12 22a10 10 0 1 1 10-10c0 2.2-1.8 3-3.5 3H17a2 2 0 0 0-1.5 3.3A2 2 0 0 1 12 22Z"/><circle cx="7.5" cy="11.5" r="1"/><circle cx="12" cy="8" r="1"/><circle cx="16.5" cy="11.5" r="1"/>',
    currency: '<circle cx="12" cy="12" r="9"/><path d="M14.5 9.2A2.6 2.6 0 0 0 12 7.8c-1.5 0-2.6.9-2.6 2 0 2.5 5.2 1.4 5.2 4 0 1.1-1.1 2-2.6 2a2.6 2.6 0 0 1-2.5-1.4"/><path d="M12 6v12"/>',
    invoice:  '<path d="M6 2h9l3 3v17l-3-2-3 2-3-2-3 2Z"/><path d="M9 9h6M9 13h6"/>',
    badge:    '<path d="M3 3h7l11 11-7 7L3 10Z"/><circle cx="7.5" cy="7.5" r="1.5"/>',
    timer:    '<circle cx="12" cy="13" r="8"/><path d="M12 13V9.5M9 2h6"/>',

    /* ── Widgets ── */
    search:   '<circle cx="11" cy="11" r="7"/><path d="m21 21-4-4"/>',
    star:     '<path d="M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z"/>',
    filter:   '<path d="M22 3H2l8 9.5V19l4 2v-8.5Z"/>',
    folder:   '<path d="M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2Z"/>',
    tag:      '<path d="M20.59 13.41l-7.17 7.17a2 2 0 0 1-2.83 0L2 12V2h10l8.59 8.59a2 2 0 0 1 0 2.82z"/><line x1="7" y1="7" x2="7.01" y2="7"/>',
    sliders:  '<path d="M4 21v-7M4 10V3M12 21v-9M12 8V3M20 21v-5M20 12V3"/><path d="M1 14h6M9 8h6M17 16h6"/>',
    sort:     '<path d="m3 16 4 4 4-4M7 20V4M21 8l-4-4-4 4M17 4v16"/>',
    chart:    '<path d="M3 3v18h18"/><rect x="7" y="9" width="3" height="12"/><rect x="13" y="4" width="3" height="17"/>',
    wcard:    '<rect x="2" y="5" width="20" height="14" rx="2"/><path d="M2 10h20"/>',
    wgrid:    '<rect x="3" y="3" width="7" height="7" rx="1.5"/><rect x="14" y="3" width="7" height="7" rx="1.5"/><rect x="3" y="14" width="7" height="7" rx="1.5"/><rect x="14" y="14" width="7" height="7" rx="1.5"/>',
    layers:   '<path d="m12 2 10 5-10 5L2 7Z"/><path d="M2 17l10 5 10-5"/><path d="M2 12l10 5 10-5"/>',
    wimg:     '<rect x="3" y="3" width="18" height="18" rx="2"/><circle cx="8.5" cy="8.5" r="1.5"/><path d="m21 15-5-5L5 21"/>',
    wtext:    '<path d="M4 7V4h16v3M9 20h6M12 4v16"/>',
    wchk:     '<path d="M9 11l3 3L22 4"/><path d="M21 12v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11"/>',
    wmarq:    '<path d="M9 11 3 6l6-5"/><path d="M3 6h11a7 7 0 1 1 0 14H4"/>',
    truck:    '<path d="M5 17H3a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11a2 2 0 0 1 2 2v2"/><rect x="9" y="11" width="14" height="10" rx="1"/><circle cx="12" cy="21" r="1.5"/><circle cx="20" cy="21" r="1.5"/>',
    check:    '<path d="M20 6 9 17l-5-5"/>',
    user:     '<circle cx="12" cy="8" r="4"/><path d="M4 21a8 8 0 0 1 16 0"/>',
    video:    '<rect x="2" y="5" width="20" height="14" rx="2"/><path d="m10 9 5 3-5 3Z"/>',
}

export default function Glyph({ name }) {
    const inner = PATHS[name] || PATHS.wgrid
    return (
        <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" dangerouslySetInnerHTML={{ __html: inner }} />
    )
}
