// =========================================
// 태황 — Line icon set (stroke, 28×28)
// =========================================

const ServiceIcon = ({ name }) => {
  const common = {
    width: 28, height: 28, viewBox: "0 0 28 28",
    fill: "none", stroke: "currentColor",
    strokeWidth: 1.4, strokeLinecap: "round", strokeLinejoin: "round",
  };
  const paths = {
    // 01 각종 인허가 — 도장 + 문서
    permit: <g><path d="M6 3.5h10l4 4V24a.5.5 0 0 1-.5.5h-13A.5.5 0 0 1 6 24z" /><path d="M16 3.5V8h4" /><circle cx="13" cy="15" r="2.6" /><path d="M10.6 20.5h4.8" /></g>,
    // 02 산지·농지 — 산
    mountain: <g><path d="M3 21.5 10 9l4 6.5" /><path d="m12 21.5 5-9 8 9z" /><path d="M3 21.5h22" /></g>,
    // 03 산업단지 — 공장/단지
    industry: <g><path d="M4 24.5V12l6 4V12l6 4V8h8v16.5z" /><path d="M4 24.5h20" /><path d="M19 12h2M19 16h2M19 20h2" /></g>,
    // 04 정책자금 — 원화/자금
    funding: <g><circle cx="14" cy="14" r="10.5" /><path d="M9.5 10.5h9M9.5 13.5h9" /><path d="M10 9l4 9 4-9" /></g>,
    // 04 법인 설립 — 기둥 건물
    institution: <g><path d="M4 11 14 5l10 6" /><path d="M6 11v9M11 11v9M17 11v9M22 11v9" /><path d="M4 23.5h20" /></g>,
    // 05 건설면허 — 안전모
    license: <g><path d="M4 18a10 10 0 0 1 20 0" /><path d="M11 8.5V6a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v2.5" /><path d="M3 18h22v2.5H3z" /></g>,
    // 06 출입국 — 지구본
    immigration: <g><circle cx="14" cy="14" r="10.5" /><path d="M3.5 14h21" /><path d="M14 3.5c3 3 3 17 0 21M14 3.5c-3 3-3 17 0 21" /></g>,
    // 07 토지 지목변경 — 지도/레이어
    land: <g><path d="m4 8 6.5-3 7 3 6.5-3v15l-6.5 3-7-3L4 23z" /><path d="M10.5 5v15M17.5 8v15" /></g>,
    // 08 점용·사용허가 — 도로
    road: <g><path d="M9 4 5 24M19 4l4 20" /><path d="M14 5v3M14 12.5v3M14 20v3" /></g>,
    // 09 국공유지 — 관청/깃발
    public: <g><path d="M14 3v5" /><path d="M14 4h6l-1.5 2L20 8h-6" /><path d="M5 24.5h18" /><path d="M7 24.5V12h14v12.5" /><path d="M11 24.5v-5h6v5" /></g>,
  };
  return <svg {...common} aria-hidden="true">{paths[name]}</svg>;
};

const SERVICE_ICONS = {
  "01": "permit", "02": "mountain", "03": "industry",
  "04": "institution", "05": "license", "06": "immigration",
  "07": "land", "08": "road", "09": "public",
};

Object.assign(window, { ServiceIcon, SERVICE_ICONS });
