// Life Memory Tree — inline SVG icon set.
//
// All icons are 1em-sized, currentColor stroked at 1.5px (1.25 for dense
// chrome). Names match the conceptual surfaces in the LMT docs: leaf, tree,
// graph, scene, capture (mic/pen), people, place, etc.

window.LMTIcons = (function () {
  const wrap = (path, sw = 1.5) => (props) => (
    <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth={sw} strokeLinecap="round" strokeLinejoin="round"
      width="1em" height="1em" {...props}>{path}</svg>
  );

  // Leaf — the recurring metaphor (event = leaf on the tree)
  const Leaf = wrap(<>
    <path d="M3 21c0-9 5-14 14-14 0 9-5 14-14 14Z"/>
    <path d="M3 21c5-6 9-8 14-14"/>
  </>);

  // A simple tree shape — used in nav + headers
  const Tree = wrap(<>
    <path d="M12 22V14"/>
    <path d="M12 14c-4 0-7-3-7-6 2 0 3 1 4 2 0-3 1-5 3-7 2 2 3 4 3 7 1-1 2-2 4-2 0 3-3 6-7 6Z"/>
  </>);

  const TreeFull = wrap(<>
    <circle cx="12" cy="8" r="4"/>
    <circle cx="7" cy="11" r="3"/>
    <circle cx="17" cy="11" r="3"/>
    <path d="M12 12v10"/>
  </>);

  // Graph / network — used in nav for Life Graph
  const Graph = wrap(<>
    <circle cx="5" cy="6" r="2"/>
    <circle cx="19" cy="6" r="2"/>
    <circle cx="12" cy="13" r="2"/>
    <circle cx="5" cy="19" r="2"/>
    <circle cx="19" cy="19" r="2"/>
    <path d="M6.5 7L10.5 12M17.5 7L13.5 12M10.5 14L6.5 18M13.5 14L17.5 18"/>
  </>);

  // Mic — voice capture
  const Mic = wrap(<>
    <rect x="9" y="3" width="6" height="11" rx="3"/>
    <path d="M5 11a7 7 0 0 0 14 0M12 18v3"/>
  </>);

  // Pen — text capture
  const Pen = wrap(<>
    <path d="M16.5 4.5l3 3L8 19l-4 1 1-4Z"/>
    <path d="M14.5 6.5l3 3"/>
  </>);

  // Scene — privacy container
  const Scene = wrap(<>
    <rect x="3" y="6" width="18" height="13" rx="2"/>
    <path d="M3 10h18M8 6V4M16 6V4"/>
  </>);

  // Lock — privacy
  const Lock = wrap(<>
    <rect x="5" y="11" width="14" height="9" rx="2"/>
    <path d="M8 11V7a4 4 0 0 1 8 0v4"/>
  </>);

  const LockOpen = wrap(<>
    <rect x="5" y="11" width="14" height="9" rx="2"/>
    <path d="M8 11V7a4 4 0 0 1 7.5-2"/>
  </>);

  // Eye for visibility
  const Eye = wrap(<>
    <path d="M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7S2 12 2 12Z"/>
    <circle cx="12" cy="12" r="3"/>
  </>);

  // Today / sun (Today bucket)
  const Sun = wrap(<>
    <circle cx="12" cy="12" r="4"/>
    <path d="M12 3v2M12 19v2M3 12h2M19 12h2M5.6 5.6l1.4 1.4M17 17l1.4 1.4M5.6 18.4 7 17M17 7l1.4-1.4"/>
  </>);

  // Clock — time-bound
  const Clock = wrap(<>
    <circle cx="12" cy="12" r="9"/>
    <path d="M12 7v5l3 2"/>
  </>);

  // Bolt — unblocker
  const Bolt = wrap(<>
    <path d="M13 2L4 14h7l-1 8 9-12h-7l1-8Z"/>
  </>);

  // Check — done
  const Check = wrap(<>
    <path d="M5 12l5 5L20 7"/>
  </>);

  // Plus
  const Plus = wrap(<>
    <path d="M12 5v14M5 12h14"/>
  </>);

  // Search
  const Search = wrap(<>
    <circle cx="11" cy="11" r="7"/>
    <path d="M21 21l-4.5-4.5"/>
  </>);

  // Sparkles — AI
  const Sparkles = wrap(<>
    <path d="M12 3l1.5 5L18 9.5 13.5 11 12 16l-1.5-5L6 9.5 10.5 8 12 3Z"/>
    <path d="M19 17l.7 2 2 .7-2 .7-.7 2-.7-2-2-.7 2-.7L19 17ZM5 16l.5 1.5L7 18l-1.5.5L5 20l-.5-1.5L3 18l1.5-.5L5 16Z"/>
  </>);

  // People
  const People = wrap(<>
    <circle cx="9" cy="8" r="3.5"/>
    <circle cx="17" cy="9" r="2.5"/>
    <path d="M3 19c0-3 2.5-5 6-5s6 2 6 5M14.5 19c0-2 1.5-4 4-4s4 1.5 4 4"/>
  </>);

  const Person = wrap(<>
    <circle cx="12" cy="8" r="4"/>
    <path d="M4 21c0-4 4-7 8-7s8 3 8 7"/>
  </>);

  // Map pin — place
  const Pin = wrap(<>
    <path d="M12 22s7-7 7-12a7 7 0 0 0-14 0c0 5 7 12 7 12Z"/>
    <circle cx="12" cy="10" r="2.5"/>
  </>);

  // Heart (mood / emotion)
  const Heart = wrap(<>
    <path d="M12 20s-7-4.5-7-10a4 4 0 0 1 7-2.5A4 4 0 0 1 19 10c0 5.5-7 10-7 10Z"/>
  </>);

  // Layers (scenes overview)
  const Layers = wrap(<>
    <path d="M12 3l9 5-9 5-9-5 9-5Z"/>
    <path d="M3 13l9 5 9-5M3 18l9 5 9-5" opacity="0.6"/>
  </>);

  // Bell
  const Bell = wrap(<>
    <path d="M6 17h12l-1.5-2V11a4.5 4.5 0 0 0-9 0v4L6 17Z"/>
    <path d="M10 20a2 2 0 0 0 4 0"/>
  </>);

  // Settings
  const Settings = wrap(<>
    <circle cx="12" cy="12" r="3"/>
    <path d="M19.4 15a1.6 1.6 0 0 0 .3 1.8l.1.1a2 2 0 1 1-2.8 2.8l-.1-.1a1.6 1.6 0 0 0-1.8-.3 1.6 1.6 0 0 0-1 1.5V21a2 2 0 0 1-4 0v-.1a1.6 1.6 0 0 0-1-1.5 1.6 1.6 0 0 0-1.8.3l-.1.1a2 2 0 1 1-2.8-2.8l.1-.1a1.6 1.6 0 0 0 .3-1.8 1.6 1.6 0 0 0-1.5-1H3a2 2 0 0 1 0-4h.1a1.6 1.6 0 0 0 1.5-1 1.6 1.6 0 0 0-.3-1.8l-.1-.1a2 2 0 1 1 2.8-2.8l.1.1a1.6 1.6 0 0 0 1.8.3 1.6 1.6 0 0 0 1-1.5V3a2 2 0 0 1 4 0v.1a1.6 1.6 0 0 0 1 1.5 1.6 1.6 0 0 0 1.8-.3l.1-.1a2 2 0 1 1 2.8 2.8l-.1.1a1.6 1.6 0 0 0-.3 1.8 1.6 1.6 0 0 0 1.5 1H21a2 2 0 0 1 0 4h-.1a1.6 1.6 0 0 0-1.5 1Z"/>
  </>);

  // Link
  const Link = wrap(<>
    <path d="M9 14l6-6"/>
    <path d="M11 6l1-1a4 4 0 0 1 5.7 5.7L16 12"/>
    <path d="M13 18l-1 1a4 4 0 0 1-5.7-5.7L8 12"/>
  </>);

  // Arrow right
  const ArrowRight = wrap(<>
    <path d="M5 12h14M13 6l6 6-6 6"/>
  </>);

  const ArrowLeft = wrap(<>
    <path d="M19 12H5M11 18l-6-6 6-6"/>
  </>);

  const ChevronRight = wrap(<>
    <path d="M9 6l6 6-6 6"/>
  </>);

  const ChevronDown = wrap(<>
    <path d="M6 9l6 6 6-6"/>
  </>);

  const Dots = wrap(<>
    <circle cx="5" cy="12" r="1.5" fill="currentColor" stroke="none"/>
    <circle cx="12" cy="12" r="1.5" fill="currentColor" stroke="none"/>
    <circle cx="19" cy="12" r="1.5" fill="currentColor" stroke="none"/>
  </>);

  const Close = wrap(<>
    <path d="M6 6l12 12M18 6L6 18"/>
  </>);

  // Waveform (recording)
  const Wave = wrap(<>
    <path d="M3 12h2M7 9v6M11 6v12M15 8v8M19 11v2"/>
  </>, 1.75);

  // Calendar
  const Cal = wrap(<>
    <rect x="3" y="5" width="18" height="16" rx="2"/>
    <path d="M3 10h18M8 3v4M16 3v4"/>
  </>);

  // Filter
  const Filter = wrap(<>
    <path d="M4 5h16l-6 8v6l-4-2v-4L4 5Z"/>
  </>);

  // Compass — explore
  const Compass = wrap(<>
    <circle cx="12" cy="12" r="9"/>
    <path d="M15.5 8.5l-2 5-5 2 2-5 5-2Z"/>
  </>);

  // Branch (scene/playbook)
  const Branch = wrap(<>
    <circle cx="6" cy="5" r="2"/>
    <circle cx="6" cy="19" r="2"/>
    <circle cx="18" cy="12" r="2"/>
    <path d="M6 7v10M8 5h4a4 4 0 0 1 4 4v1M8 19h4a4 4 0 0 0 4-4v-1"/>
  </>);

  // Image / photo
  const Image = wrap(<>
    <rect x="3" y="5" width="18" height="14" rx="2"/>
    <circle cx="9" cy="10" r="1.5"/>
    <path d="M21 16l-5-5-9 9"/>
  </>);

  // Volume / Audio
  const Audio = wrap(<>
    <path d="M11 5v14l-5-4H3v-6h3l5-4Z"/>
    <path d="M15 9a4 4 0 0 1 0 6M18 6a8 8 0 0 1 0 12"/>
  </>);

  // Tag
  const Tag = wrap(<>
    <path d="M3 12V4h8l10 10-8 8L3 12Z"/>
    <circle cx="8" cy="9" r="1.5"/>
  </>);

  // Stack/grid for boards
  const Grid = wrap(<>
    <rect x="4" y="4" width="7" height="7" rx="1.5"/>
    <rect x="13" y="4" width="7" height="7" rx="1.5"/>
    <rect x="4" y="13" width="7" height="7" rx="1.5"/>
    <rect x="13" y="13" width="7" height="7" rx="1.5"/>
  </>);

  // Globe — public
  const Globe = wrap(<>
    <circle cx="12" cy="12" r="9"/>
    <path d="M3 12h18M12 3a14 14 0 0 1 0 18M12 3a14 14 0 0 0 0 18"/>
  </>);

  // Undo
  const Undo = wrap(<>
    <path d="M3 7v6h6"/>
    <path d="M3 13a9 9 0 1 1 3 7"/>
  </>);

  return {
    Leaf, Tree, TreeFull, Graph, Mic, Pen, Scene, Lock, LockOpen, Eye,
    Sun, Clock, Bolt, Check, Plus, Search, Sparkles, People, Person, Pin,
    Heart, Layers, Bell, Settings, Link, ArrowRight, ArrowLeft, ChevronRight,
    ChevronDown, Dots, Close, Wave, Cal, Filter, Compass, Branch, Image,
    Audio, Tag, Grid, Globe, Undo,
  };
})();
