﻿/* SynapIA icons — Phosphor Icons (regular weight) via CSS font.
   window.I[name](props) returns a React element.
   Custom SVG kept only for brand marks (hex, synapse). */

const PhIcon = (phName) => ({ size = 16, sw, style, className, ...rest }) => (
  <i
    className={`ph ph-${phName}${className ? ' ' + className : ''}`}
    style={{ fontSize: size, lineHeight: 1, display: 'inline-flex', alignItems: 'center', justifyContent: 'center', ...style }}
    {...rest}
  />
);

Object.assign(window.I, {
  // Navigation / UI
  plus:      PhIcon('plus'),
  search:    PhIcon('magnifying-glass'),
  send:      PhIcon('paper-plane-tilt'),
  arrowUp:   PhIcon('arrow-up'),
  arrowDown: PhIcon('arrow-down'),
  arrowR:    PhIcon('arrow-right'),
  arrowL:    PhIcon('arrow-left'),
  menu:      PhIcon('list'),
  panelL:    PhIcon('sidebar-simple'),
  x:         PhIcon('x'),
  check:     PhIcon('check'),
  more:      PhIcon('dots-three'),
  clock:     PhIcon('clock'),

  // Composer tools
  attach:    PhIcon('paperclip'),
  mic:       PhIcon('microphone'),
  sparkle:   PhIcon('sparkle'),
  refine:    PhIcon('arrows-counter-clockwise'),
  scan:      PhIcon('scan'),
  wand:      PhIcon('magic-wand'),
  scissors:  PhIcon('scissors'),
  compress:  PhIcon('arrows-in-simple'),
  maximize:  PhIcon('arrows-out'),

  // Actions
  copy:      PhIcon('copy'),
  redo:      PhIcon('arrow-counter-clockwise'),
  thumbsUp:  PhIcon('thumbs-up'),
  thumbsDn:  PhIcon('thumbs-down'),
  share:     PhIcon('share-network'),
  edit:      PhIcon('pencil-simple'),
  trash:     PhIcon('trash'),
  download:  PhIcon('download-simple'),
  link:      PhIcon('link'),
  image:     PhIcon('image'),
  file:      PhIcon('file'),

  // Theme
  sun:       PhIcon('sun'),
  moon:      PhIcon('moon'),
  globe:     PhIcon('globe'),
  settings:  PhIcon('gear'),

  // Mode icons
  chat:      PhIcon('chat-circle'),
  brain:     PhIcon('brain'),
  bolt:      PhIcon('lightning'),
  scale:     PhIcon('scales'),
  process:   PhIcon('file-text'),
  eye:       PhIcon('eye'),
  user:      PhIcon('user-circle'),
  book:      PhIcon('book-open'),
  calc:      PhIcon('calculator'),
  relatorio: PhIcon('clipboard-text'),

  // Custom brand SVGs
  hex: ({size = 24, ...p}) => (
    <svg width={size} height={size} viewBox="0 0 100 100" {...p}>
      <polygon points="50,5 92,28 92,72 50,95 8,72 8,28" fill="currentColor"/>
    </svg>
  ),
  synapse: ({size = 24, ...p}) => (
    <svg width={size} height={size} viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.8" strokeLinecap="round" strokeLinejoin="round" {...p}>
      <circle cx="12" cy="12" r="4" stroke="#0ea5e9" />
      <path d="M12 8A10 10 0 0 0 3 3" stroke="#0ea5e9" strokeOpacity="0.8"/>
      <path d="M12 8A10 10 0 0 1 21 3" stroke="#8b5cf6" strokeOpacity="0.8"/>
      <path d="M12 16A10 10 0 0 1 3 21" stroke="#0ea5e9" strokeOpacity="0.8"/>
      <path d="M12 16A10 10 0 0 0 21 21" stroke="#8b5cf6" strokeOpacity="0.8"/>
      <circle cx="3" cy="3" r="1.5" fill="#0ea5e9" stroke="none"/>
      <circle cx="21" cy="3" r="1.5" fill="#8b5cf6" stroke="none"/>
      <circle cx="3" cy="21" r="1.5" fill="#0ea5e9" stroke="none"/>
      <circle cx="21" cy="21" r="1.5" fill="#8b5cf6" stroke="none"/>
      <text x="12" y="12.5" fontSize="5" fontWeight="900" fontFamily="system-ui, sans-serif" textAnchor="middle" dominantBaseline="middle" fill="currentColor" stroke="none">S</text>
    </svg>
  ),
});
