/* c0lor Liquid Glass 图标子集 — 从 c0lor-ui Icon.tsx 移植所需的线性图标。
   stroke=currentColor, round caps. 导出到 window 供其它 babel 脚本使用。 */
function I({ size = 22, sw = 1.8, fill, children, vb = 24 }) {
  return (
    <svg width={size} height={size} viewBox={`0 0 ${vb} ${vb}`}
      fill={fill ?? 'none'} stroke={fill ? 'none' : 'currentColor'}
      strokeWidth={sw} strokeLinecap="round" strokeLinejoin="round" aria-hidden="true">
      {children}
    </svg>
  );
}

function Icon({ name, size = 22, sw = 1.8 }) {
  const p = { size, sw };
  switch (name) {
    case 'tv': return <I {...p}><rect x="2.5" y="4.5" width="19" height="13" rx="2.4" /><path d="M12 17.5v3M8.5 20.5h7" /></I>;
    case 'washer': return <I {...p}><rect x="4" y="2.5" width="16" height="19" rx="2.8" /><path d="M4 7.5h16" /><circle cx="12" cy="14" r="4.5" /><circle cx="7.2" cy="5" r=".8" fill="currentColor" stroke="none" /><path d="M14.5 5h2.5" /></I>;
    case 'aircon': return <I {...p}><rect x="2.5" y="4" width="19" height="10" rx="2.6" /><path d="M5 9.5h14M7 14.5c0 1.8-1.4 2.1-1.4 3.7M12 14.5c0 2.4-1.5 2.8-1.5 5M17 14.5c0 1.8 1.4 2.1 1.4 3.7" /></I>;
    case 'fridge': return <I {...p}><rect x="6" y="2.5" width="12" height="19" rx="2.5" /><path d="M6 10h12M9 5.5v2M9 13v3" /></I>;
    case 'phone': return <I {...p}><rect x="6.5" y="2.5" width="11" height="19" rx="2.6" /><path d="M10 5h4M11 18.7h2" /></I>;
    case 'wifi': return <I {...p}><path d="M4 9.5a12 12 0 0 1 16 0M7 13a7.5 7.5 0 0 1 10 0M10.2 16.3a2.8 2.8 0 0 1 3.6 0" /><circle cx="12" cy="19.2" r="1" fill="currentColor" stroke="none" /></I>;
    case 'crosshair': return <I {...p}><circle cx="12" cy="12" r="7.5" /><path d="M12 2v3.2M12 18.8V22M22 12h-3.2M5.2 12H2" /><circle cx="12" cy="12" r="1.4" fill="currentColor" stroke="none" /></I>;
    case 'database': return <I {...p}><ellipse cx="12" cy="5.5" rx="7.5" ry="3" /><path d="M4.5 5.5v6c0 1.66 3.36 3 7.5 3s7.5-1.34 7.5-3v-6M4.5 11.5v6c0 1.66 3.36 3 7.5 3s7.5-1.34 7.5-3v-6" /></I>;
    case 'layers': return <I {...p}><path d="M12 3 21 7.5 12 12 3 7.5z" /><path d="M3 12l9 4.5L21 12M3 16.5 12 21l9-4.5" /></I>;
    case 'broadcast': return <I {...p}><circle cx="12" cy="12" r="2" fill="currentColor" stroke="none" /><path d="M8.5 8.5a5 5 0 0 0 0 7M15.5 8.5a5 5 0 0 1 0 7M6 6a8 8 0 0 0 0 12M18 6a8 8 0 0 1 0 12" /></I>;
    case 'activity': return <I {...p} sw={2}><path d="M3 12h3.5l2.5-7 4 14 2.5-7H21" /></I>;
    case 'sun': return <I {...p}><circle cx="12" cy="12" r="4" /><path d="M12 2.5v2.3M12 19.2v2.3M21.5 12h-2.3M4.8 12H2.5M18.4 5.6l-1.6 1.6M7.2 16.8l-1.6 1.6M18.4 18.4l-1.6-1.6M7.2 7.2 5.6 5.6" /></I>;
    case 'moon': return <I {...p}><path d="M20 14.2A8 8 0 1 1 10 4a6.4 6.4 0 0 0 10 10.2Z" /></I>;
    case 'bolt': return <I {...p}><path d="M13 2.5 4.5 13.5H11l-1 8 8.5-11H12z" fill="currentColor" stroke="none" /></I>;
    case 'plus': return <I {...p}><path d="M12 5v14M5 12h14" /></I>;
    case 'x': return <I {...p}><path d="M6 6l12 12M18 6 6 18" /></I>;
    case 'check': return <I {...p} sw={2.2}><path d="M5 12.5 10 17.5 19.5 7" /></I>;
    case 'chevRight': return <I {...p}><path d="M9.5 5 16 12l-6.5 7" /></I>;
    case 'chevDown': return <I {...p}><path d="M6 9.5 12 15l6-5.5" /></I>;
    case 'search': return <I {...p}><circle cx="11" cy="11" r="7" /><path d="m20 20-3.6-3.6" /></I>;
    case 'sliders': return <I {...p}><path d="M5 7h9M18 7h1M5 12h2M11 12h8M5 17h7M16 17h3" /><circle cx="16" cy="7" r="2" /><circle cx="9" cy="12" r="2" /><circle cx="14" cy="17" r="2" /></I>;
    case 'monitor': return <I {...p}><rect x="3" y="4" width="18" height="12.5" rx="2.4" /><path d="M9 20.5h6M12 16.5v4" /></I>;
    case 'palette': return <I {...p}><path d="M12 3.2a8.8 8.8 0 1 0 0 17.6c1.3 0 1.8-1 1.4-1.8-.5-1 .2-2.1 1.4-2.1H17a3.8 3.8 0 0 0 3.8-3.8C20.8 7 16.9 3.2 12 3.2Z" /><circle cx="8" cy="11" r="1" fill="currentColor" stroke="none" /><circle cx="12" cy="8.2" r="1" fill="currentColor" stroke="none" /><circle cx="15.8" cy="10.4" r="1" fill="currentColor" stroke="none" /></I>;
    case 'scan': return <I {...p}><path d="M4 8V6a2 2 0 0 1 2-2h2M16 4h2a2 2 0 0 1 2 2v2M20 16v2a2 2 0 0 1-2 2h-2M8 20H6a2 2 0 0 1-2-2v-2M4 12h16" /></I>;
    case 'gamut': return <I {...p}><path d="M12 3.5 21 19H3z" /><circle cx="12" cy="14" r="1.4" fill="currentColor" stroke="none" /></I>;
    case 'eotf': return <I {...p}><path d="M2.5 13h4l2.2-7 3 14 2.3-9 1.7 4h5.3" /></I>;
    case 'plug': return <I {...p}><path d="M9 2.5v4M15 2.5v4M6.5 6.5h11v3a5.5 5.5 0 0 1-11 0zM12 15v6.5" /></I>;
    case 'grid': return <I {...p}><rect x="3.5" y="3.5" width="17" height="17" rx="3" /><path d="M3.5 9.5h17M3.5 14.5h17M9.5 3.5v17M14.5 3.5v17" /></I>;
    case 'eye': return <I {...p}><path d="M2.5 12S6 5 12 5s9.5 7 9.5 7-3.5 7-9.5 7-9.5-7-9.5-7z" /><circle cx="12" cy="12" r="3.2" /></I>;
    case 'cube': return <I {...p}><path d="M12 2.8 20.5 7.5v9L12 21.2 3.5 16.5v-9zM3.6 7.6 12 12.2l8.4-4.6M12 12.2V21" /></I>;
    case 'gear': return <I {...p}><path d="M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z" /><circle cx="12" cy="12" r="3" /></I>;
    case 'download': return <I {...p}><path d="M12 3.5v11M7.5 10 12 14.5 16.5 10M5 19.5h14" /></I>;
    case 'spectral': return <I {...p}><path d="M3 14c2-6 4-9 5-9s1.6 4 2.4 8 1.5 6 2.3 6 1.6-3 2.4-7 1.6-6 2.4-6" /></I>;
    case 'camera': return <I {...p}><rect x="3" y="7" width="18" height="13" rx="3" /><circle cx="12" cy="13.5" r="3.4" /><path d="M8.5 7 9.8 4.7h4.4L15.5 7" /></I>;
    case 'image': return <I {...p}><rect x="3.5" y="4.5" width="17" height="15" rx="2.6" /><circle cx="9" cy="10" r="1.7" /><path d="M4.5 16.5 9 12.5l3 2.3 3-2.6 4.5 4.3" /></I>;
    case 'sparkle': return <I {...p}><path d="M12 3.2l1.7 4.8 4.8 1.7-4.8 1.7L12 16.2l-1.7-4.8L5.5 9.7l4.8-1.7z" /><path d="M18.4 14.4l.8 2 2 .8-2 .8-.8 2-.8-2-2-.8 2-.8z" /></I>;
    case 'ruler': return <I {...p}><path d="M3.5 9.4 9.4 3.5 20.5 14.6 14.6 20.5z" /><path d="M7 7.4l1.8 1.8M9.6 4.9l2.6 2.6M12.1 7.4l1.8 1.8M14.7 4.9l2.6 2.6" /></I>;
    case 'refresh': return <I {...p}><path d="M19.5 12a7.5 7.5 0 1 1-2.2-5.3" /><path d="M20 4v4.2h-4.2" /></I>;
    case 'arrowLeft': return <I {...p}><path d="M19 12H5.5M11.5 6 5 12l6.5 6" /></I>;
    case 'lock': return <I {...p}><rect x="5" y="10.5" width="14" height="9.5" rx="2.4" /><path d="M8 10.5V7.6a4 4 0 0 1 8 0v2.9" /></I>;
    case 'upload': return <I {...p}><path d="M12 15.5v-11M7.5 8 12 3.5 16.5 8M5 19.5h14" /></I>;
    case 'turn': return <I {...p}><path d="M4.5 9.5a8 8 0 0 1 15 .3" /><path d="M19.7 5.4v4.4h-4.4" /><path d="M19.5 14.5a8 8 0 0 1-15-.3" /><path d="M4.3 18.6v-4.4h4.4" /></I>;
    case 'sunset': return <I {...p}><path d="M17.5 15.5a5.5 5.5 0 0 0-11 0" /><path d="M12 3.5V7M5 8.4l1.6 1.6M19 8.4l-1.6 1.6M2.5 15.5h2.3M19.2 15.5h2.3M4 19.5h16" /></I>;
    case 'lamp': return <I {...p}><path d="M9.2 3.5h5.6l2.4 5.5H6.8z" /><path d="M12 9v9.5M8.5 20.5h7" /></I>;
    default: return <I {...p}><circle cx="12" cy="12" r="8" /></I>;
  }
}

Object.assign(window, { Icon });
