---
/** Inline line icons (24px grid, stroke = currentColor). Brand marks are simplified glyphs. */
interface Props { name: string; size?: number; class?: string; label?: string }
const { name, size = 22, class: cls, label } = Astro.props;

const paths: Record<string, string> = {
  whatsapp: '<path d="M4 20l1.2-3.9A8.5 8.5 0 1 1 8 19.1L4 20z"/><path d="M9 8.6c0 3 2.4 6.2 5.6 6.6.7.1 1.6-.5 1.8-1.2l-1.7-.9-.9.8c-1-.4-2.1-1.4-2.6-2.5l.7-.9-.8-1.8c-.8.1-1.6.9-1.6 1.6z" fill="currentColor" stroke="none"/>',
  phone: '<path d="M5 4h3.2l1.6 4-2 1.3a10.5 10.5 0 0 0 4.9 4.9l1.3-2 4 1.6V17a2 2 0 0 1-2.2 2A15 15 0 0 1 3 6.2 2 2 0 0 1 5 4z"/>',
  mail: '<rect x="3" y="5" width="18" height="14" rx="2.5"/><path d="M4 7l8 6 8-6"/>',
  pin: '<path d="M12 21s-6.5-5.6-6.5-11a6.5 6.5 0 0 1 13 0c0 5.4-6.5 11-6.5 11z"/><circle cx="12" cy="10" r="2.4"/>',
  instagram: '<rect x="3.5" y="3.5" width="17" height="17" rx="5"/><circle cx="12" cy="12" r="4"/><circle cx="17.2" cy="6.8" r="1" fill="currentColor" stroke="none"/>',
  youtube: '<rect x="2.5" y="5.5" width="19" height="13" rx="4"/><path d="M10.2 9.2v5.6l4.8-2.8z" fill="currentColor" stroke="none"/>',
  facebook: '<path d="M14 21v-7.5h2.6l.4-3H14V8.7c0-.9.3-1.5 1.6-1.5H17V4.5c-.3 0-1.2-.1-2.3-.1-2.3 0-3.7 1.4-3.7 3.9v2.2H8.5v3H11V21"/>',
  tiktok: '<path d="M14 4v10.5a3.5 3.5 0 1 1-3.5-3.5"/><path d="M14 4c.4 2.4 2 4 4.5 4.3"/>',
  telegram: '<path d="M21 4.5L3 11.4l5.6 2 2 6.1 3.1-3.6 4.6 3.4L21 4.5z"/><path d="M8.6 13.4L18 7"/>',
  podcast: '<rect x="9" y="3" width="6" height="11" rx="3"/><path d="M5.5 11a6.5 6.5 0 0 0 13 0M12 17.5V21M8.5 21h7"/>',
  menu: '<path d="M4 7h16M4 12h16M4 17h16"/>',
  close: '<path d="M6 6l12 12M18 6L6 18"/>',
  arrow: '<path d="M15 5l-7 7 7 7"/>',
  a11y: '<circle cx="12" cy="4.5" r="1.8" fill="currentColor" stroke="none"/><path d="M5 8.5c2.3.7 4.6 1 7 1s4.7-.3 7-1M12 9.5V14m0 0l-3 6.5M12 14l3 6.5"/>',
  calendar: '<rect x="3.5" y="5" width="17" height="15" rx="2.5"/><path d="M3.5 10h17M8 3v4M16 3v4"/>',
  clock: '<circle cx="12" cy="12" r="8.5"/><path d="M12 7.5V12l3 2"/>',
  search: '<circle cx="11" cy="11" r="6.5"/><path d="M16 16l4.5 4.5"/>',
  print: '<path d="M7 9V4h10v5M7 17H5a2 2 0 0 1-2-2v-4a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v4a2 2 0 0 1-2 2h-2"/><rect x="7" y="14" width="10" height="6" rx="1"/>',
  share: '<circle cx="18" cy="5.5" r="2.5"/><circle cx="6" cy="12" r="2.5"/><circle cx="18" cy="18.5" r="2.5"/><path d="M8.2 10.8l7.6-4M8.2 13.2l7.6 4"/>',
  link: '<path d="M10 14a4 4 0 0 0 5.7 0l3-3a4 4 0 0 0-5.7-5.7l-1.2 1.2M14 10a4 4 0 0 0-5.7 0l-3 3a4 4 0 0 0 5.7 5.7l1.2-1.2"/>',
  check: '<path d="M5 12.5l4.5 4.5L19 7.5"/>',
  leaf: '<path d="M5 19c0-8 5-13 14-14-1 9-6 14-14 14z"/><path d="M5 19l7-7"/>',
  spiral: '<path d="M12.5 12.2c.3-.6-.2-1.3-.9-1.2-.9.1-1.3 1.1-1 1.9.5 1.2 2.1 1.5 3.1.7 1.4-1 1.4-3 .3-4.2-1.5-1.6-4.1-1.5-5.6 0-1.9 1.9-1.7 5 .2 6.8 2.3 2.1 6 1.9 8.1-.3 2.4-2.6 2.1-6.8-.5-9.2"/>',
  foot: '<path d="M9.5 21c-2.2 0-3.5-1.8-3.3-4.2.2-2.1 1-3.6 1-5.6 0-2.3 1.4-3.7 3.2-3.7 2 0 3.1 1.6 2.9 3.8-.2 2.3-1.3 3.4-1.1 5.6.2 2.4-.5 4.1-2.7 4.1z"/><circle cx="14.6" cy="5.6" r="1.25"/><circle cx="17.2" cy="7.2" r="1"/><circle cx="18.6" cy="9.8" r=".85"/><circle cx="12" cy="4.4" r="1.35"/>',
  drop: '<path d="M12 3.5c3.4 4.4 6 7.5 6 10.9a6 6 0 0 1-12 0c0-3.4 2.6-6.5 6-10.9z"/><path d="M9.2 14.6a2.9 2.9 0 0 0 2.6 2.8"/>',
};
const body = paths[name] ?? '';
---
<svg
  class={cls}
  width={size}
  height={size}
  viewBox="0 0 24 24"
  fill="none"
  stroke="currentColor"
  stroke-width="1.6"
  stroke-linecap="round"
  stroke-linejoin="round"
  role={label ? 'img' : undefined}
  aria-label={label}
  aria-hidden={label ? undefined : 'true'}
  set:html={body}
/>
