// Inline SVG icons. Single-color via currentColor.

const Icon = ({ d, size = 16, stroke = 1.6, fill = "none", style }) => (
  <svg
    width={size}
    height={size}
    viewBox="0 0 24 24"
    fill={fill}
    stroke="currentColor"
    strokeWidth={stroke}
    strokeLinecap="round"
    strokeLinejoin="round"
    style={style}
    aria-hidden="true"
  >
    {d}
  </svg>
);

const Icons = {
  Home: (p) => <Icon {...p} d={<><path d="M3 11l9-8 9 8" /><path d="M5 10v10h14V10" /></>} />,
  Folder: (p) => <Icon {...p} d={<path d="M3 7a2 2 0 0 1 2-2h4l2 2h8a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V7z" />} />,
  File: (p) => <Icon {...p} d={<><path d="M14 3H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z" /><path d="M14 3v6h6" /></>} />,
  Chevron: (p) => <Icon {...p} d={<polyline points="9 6 15 12 9 18" />} />,
  Close: (p) => <Icon {...p} d={<><line x1="6" y1="6" x2="18" y2="18" /><line x1="18" y1="6" x2="6" y2="18" /></>} />,
  Send: (p) => <Icon {...p} fill="currentColor" stroke="none" d={<path d="M3.4 20.5 21 12 3.4 3.5 3 10l12 2-12 2 .4 6.5z" />} />,
  Sparkle: (p) => <Icon {...p} d={<><path d="M12 3v4M12 17v4M3 12h4M17 12h4M6 6l3 3M15 15l3 3M18 6l-3 3M9 15l-3 3" /></>} />,
  Mail: (p) => <Icon {...p} d={<><rect x="3" y="5" width="18" height="14" rx="2" /><path d="M3 7l9 7 9-7" /></>} />,
  MapPin: (p) => <Icon {...p} d={<><path d="M12 22s-7-7.5-7-13a7 7 0 0 1 14 0c0 5.5-7 13-7 13z" /><circle cx="12" cy="9" r="2.5" /></>} />,
  Shield: (p) => <Icon {...p} d={<path d="M12 3l8 3v5c0 5-3.5 8.5-8 10-4.5-1.5-8-5-8-10V6l8-3z" />} />,
  Briefcase: (p) => <Icon {...p} d={<><rect x="3" y="7" width="18" height="13" rx="2" /><path d="M8 7V5a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" /></>} />,
  Code: (p) => <Icon {...p} d={<><polyline points="8 8 4 12 8 16" /><polyline points="16 8 20 12 16 16" /><line x1="14" y1="6" x2="10" y2="18" /></>} />,
  Heart: (p) => <Icon {...p} d={<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" />} />,
  Pen: (p) => <Icon {...p} d={<><path d="M12 20h9" /><path d="M16.5 3.5a2.1 2.1 0 0 1 3 3L7 19l-4 1 1-4L16.5 3.5z" /></>} />,
  MoreH: (p) => <Icon {...p} fill="currentColor" stroke="none" d={<><circle cx="5" cy="12" r="1.6" /><circle cx="12" cy="12" r="1.6" /><circle cx="19" cy="12" r="1.6" /></>} />,
  Download: (p) => <Icon {...p} d={<><path d="M12 3v12" /><polyline points="7 10 12 15 17 10" /><path d="M5 20h14" /></>} />,
  FileWarn: (p) => <Icon {...p} d={<><path d="M14 3H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z" /><path d="M14 3v6h6" /><path d="M12 12v3" /><circle cx="12" cy="18" r="0.6" fill="currentColor" /></>} />,
};

const FOLDER_ICONS = {
  Certifications: Icons.Shield,
  Experience: Icons.Briefcase,
  Projects: Icons.Code,
  "Personal Interests": Icons.Heart,
  Writing: Icons.Pen,
};

window.Icons = Icons;
window.FOLDER_ICONS = FOLDER_ICONS;
