// Abstract geometric glyphs — no AI-drawn objects
const Glyph = ({ name, size = 28, color = 'currentColor' }) => {
  const s = size;
  const stroke = 1.6;
  const common = { width: s, height: s, viewBox: '0 0 28 28', fill: 'none', stroke: color, strokeWidth: stroke, strokeLinecap: 'round', strokeLinejoin: 'round' };
  switch (name) {
    case 'image':
      return (
        <svg {...common}>
          <rect x="4" y="6" width="20" height="16" rx="3" />
          <circle cx="10" cy="12" r="2" />
          <path d="M4 18L10 13L16 18L24 12" />
        </svg>
      );
    case 'video':
      return (
        <svg {...common}>
          <rect x="3" y="7" width="16" height="14" rx="2.5" />
          <path d="M19 11L25 8V20L19 17" />
        </svg>
      );
    case 'workflow':
      return (
        <svg {...common}>
          <circle cx="6" cy="7" r="2.5" />
          <circle cx="22" cy="7" r="2.5" />
          <circle cx="14" cy="21" r="2.5" />
          <path d="M8 8.5L12 19" />
          <path d="M20 8.5L16 19" />
          <path d="M8.5 7H19.5" />
        </svg>
      );
    case 'model':
      return (
        <svg {...common}>
          <circle cx="14" cy="10" r="4" />
          <path d="M5 23C5 18.5 9 16 14 16C19 16 23 18.5 23 23" />
        </svg>
      );
    case 'folder':
      return (
        <svg {...common}>
          <path d="M3 8C3 6.9 3.9 6 5 6H10L12 8H23C24.1 8 25 8.9 25 10V20C25 21.1 24.1 22 23 22H5C3.9 22 3 21.1 3 20V8Z" />
          <path d="M3 12H25" />
        </svg>
      );
    case 'cost':
      return (
        <svg {...common}>
          <circle cx="14" cy="14" r="10" />
          <path d="M14 8V20" />
          <path d="M17 10.5C16.3 9.6 15.2 9 14 9C12.3 9 11 10 11 11.5C11 14.5 17 13.5 17 16.5C17 18 15.7 19 14 19C12.8 19 11.7 18.4 11 17.5" />
        </svg>
      );
    case 'speed':
      return (
        <svg {...common}>
          <path d="M13 2L4 16H13L11 26L22 10H13L15 2H13Z" />
        </svg>
      );
    case 'shield':
      return (
        <svg {...common}>
          <path d="M14 3L5 6V14C5 19 9 23 14 25C19 23 23 19 23 14V6L14 3Z" />
          <path d="M10 14L13 17L18 11" />
        </svg>
      );
    case 'cart':
      return (
        <svg {...common}>
          <path d="M3 5H6L8 18H22L24 9H7" />
          <circle cx="10" cy="23" r="1.5" />
          <circle cx="20" cy="23" r="1.5" />
        </svg>
      );
    case 'camera':
      return (
        <svg {...common}>
          <path d="M4 9C4 7.9 4.9 7 6 7H9L11 5H17L19 7H22C23.1 7 24 7.9 24 9V20C24 21.1 23.1 22 22 22H6C4.9 22 4 21.1 4 20V9Z" />
          <circle cx="14" cy="14" r="4.5" />
        </svg>
      );
    case 'phone':
      return (
        <svg {...common}>
          <rect x="8" y="3" width="12" height="22" rx="3" />
          <path d="M13 21H15" />
        </svg>
      );
    case 'print':
      return (
        <svg {...common}>
          <path d="M8 3H20V9H8V3Z" />
          <rect x="4" y="9" width="20" height="10" rx="2" />
          <rect x="8" y="17" width="12" height="7" />
          <circle cx="20" cy="13" r="1" fill={color} />
        </svg>
      );
    case 'arrow':
      return (
        <svg {...common}>
          <path d="M5 14H22" />
          <path d="M16 8L22 14L16 20" />
        </svg>
      );
    case 'spark':
      return (
        <svg {...common}>
          <path d="M14 3V10" />
          <path d="M14 18V25" />
          <path d="M3 14H10" />
          <path d="M18 14H25" />
          <path d="M6 6L11 11" />
          <path d="M17 17L22 22" />
          <path d="M22 6L17 11" />
          <path d="M11 17L6 22" />
        </svg>
      );
    case 'logo':
      // Custom S mark - rounded wordmark bullet
      return (
        <svg width={size} height={size} viewBox="0 0 28 28" fill="none">
          <circle cx="14" cy="14" r="13" fill={color} />
          <path d="M18.5 10.5C17.5 9 15.8 8 14 8C11.5 8 9.5 9.5 9.5 11.5C9.5 15.5 18.5 14 18.5 18C18.5 19.8 16.5 21 14 21C12 21 10.3 20.2 9.3 18.8" stroke="#0B0A0F" strokeWidth="1.8" strokeLinecap="round" fill="none" />
        </svg>
      );
    default:
      return <svg {...common}><circle cx="14" cy="14" r="8" /></svg>;
  }
};

window.Glyph = Glyph;
