/* Minimal line-icon set for teorihuset.no. Single stroke style, no fills —
 * keeps the page calm and consistent. Exposed as window.Icons. */
(function () {
  const S = ({ size = 18, children, vb = 24 }) =>
    React.createElement(
      'svg',
      {
        width: size, height: size, viewBox: `0 0 ${vb} ${vb}`,
        fill: 'none', stroke: 'currentColor', strokeWidth: 1.7,
        strokeLinecap: 'round', strokeLinejoin: 'round', 'aria-hidden': true,
      },
      children
    );
  const P = (d) => React.createElement('path', { d });
  const E = (cx, cy, r) => React.createElement('circle', { cx, cy, r });

  window.Icons = {
    Check:  (p) => S({ ...p, children: P('M20 6 9 17l-5-5') }),
    Arrow:  (p) => S({ ...p, children: [P('M5 12h14'), P('m13 6 6 6-6 6')] }),
    Lock:   (p) => S({ ...p, children: [React.createElement('rect',{x:4,y:11,width:16,height:10,rx:2}), P('M8 11V8a4 4 0 0 1 8 0v3')] }),
    Shield: (p) => S({ ...p, children: [P('M12 3 5 6v6c0 4 3 7 7 9 4-2 7-5 7-9V6z'), P('m9 12 2 2 4-4')] }),
    Plus:   (p) => S({ ...p, children: [P('M12 5v14'), P('M5 12h14')] }),
    Phone:  (p) => S({ ...p, children: P('M5 4h4l2 5-3 2a12 12 0 0 0 5 5l2-3 5 2v4a2 2 0 0 1-2 2A16 16 0 0 1 3 6a2 2 0 0 1 2-2') }),
    Mail:   (p) => S({ ...p, children: [React.createElement('rect',{x:3,y:5,width:18,height:14,rx:2}), P('m3 7 9 6 9-6')] }),
    Sync:   (p) => S({ ...p, children: [P('M21 12a9 9 0 0 1-15 6.7L3 16'), P('M3 12a9 9 0 0 1 15-6.7L21 8'), P('M21 4v4h-4'), P('M3 20v-4h4')] }),
    Book:   (p) => S({ ...p, children: [P('M4 5a2 2 0 0 1 2-2h13v16H6a2 2 0 0 0-2 2z'), P('M4 19a2 2 0 0 1 2-2h13')] }),
    Bulb:   (p) => S({ ...p, children: [P('M9 18h6'), P('M10 21h4'), P('M12 3a6 6 0 0 0-4 10c.7.7 1 1.5 1 2h6c0-.5.3-1.3 1-2a6 6 0 0 0-4-10z')] }),
    Timer:  (p) => S({ ...p, children: [E(12,13,8), P('M12 9v4l3 2'), P('M9 2h6')] }),
    // Exam category icons
    Car:    (p) => S({ ...p, children: [P('M5 16 6.5 9.5A2 2 0 0 1 8.4 8h7.2a2 2 0 0 1 1.9 1.5L19 16'), P('M4 16h16v3a1 1 0 0 1-1 1h-2a1 1 0 0 1-1-1v-1H8v1a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1z'), P('M7 16v.01'), P('M17 16v.01')] }),
    Target: (p) => S({ ...p, children: [E(12,12,8), E(12,12,4), E(12,12,1)] }),
    Drone:  (p) => S({ ...p, children: [React.createElement('rect',{x:9,y:9,width:6,height:6,rx:1}), P('M9 9 5 5'), P('M15 9l4-4'), P('M9 15l-4 4'), P('M15 15l4 4'), E(5,5,2), E(19,5,2), E(5,19,2), E(19,19,2)] }),
    Anchor: (p) => S({ ...p, children: [E(12,5,2), P('M12 7v13'), P('M5 13a7 7 0 0 0 14 0'), P('M5 13H3'), P('M21 13h-2')] }),
    Brief:  (p) => S({ ...p, children: [React.createElement('rect',{x:3,y:7,width:18,height:13,rx:2}), P('M9 7V5a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2'), P('M3 13h18')] }),
    Wine:   (p) => S({ ...p, children: [P('M8 3h8l-1 6a3 3 0 0 1-6 0z'), P('M12 9v8'), P('M9 21h6')] }),
    Store:  (p) => S({ ...p, children: [P('M4 9 5 4h14l1 5'), P('M4 9a3 3 0 0 0 6 0 3 3 0 0 0 6 0 3 3 0 0 0 6 0'), P('M5 10v9a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-9')] }),
    Flag:   (p) => S({ ...p, children: [P('M5 21V4'), P('M5 4h12l-2 4 2 4H5')] }),
    // App-chrome icons (device mockup header)
    ChevronLeft: (p) => S({ ...p, children: P('m15 18-6-6 6-6') }),
    Menu:   (p) => S({ ...p, children: [P('M4 6h16'), P('M4 12h16'), P('M4 18h16')] }),
  };
})();
