// figma node: 5:293 Interface (1626 variants) — set d'icônes complet.
// Les données SVG vivent dans ./icons/icon-data.js (une entrée par variante).
// <Interface property1="arrow-right" /> ou <Icon name="InterfaceProperty1ArrowRight" />.
import icons from './icons/icon-data.js';

const PREFIX = 'InterfaceProperty1';
const toKey = (name) =>
  PREFIX +
  String(name)
    .split('-')
    .map((s) => (s ? s.charAt(0).toUpperCase() + s.slice(1) : s))
    .join('');

let lowerIndex = null;
function lookup(name) {
  const key = toKey(name);
  if (icons[key]) return icons[key];
  if (!lowerIndex) {
    lowerIndex = {};
    for (const k of Object.keys(icons)) lowerIndex[k.toLowerCase()] = k;
  }
  const k = lowerIndex[key.toLowerCase()];
  return k ? icons[k] : null;
}

export function Interface({ property1 = 'arrow-right', size = 24, className, style, ...rest }) {
  const d = lookup(property1);
  if (!d) return null;
  return (
    <svg
      className={className}
      width={size}
      height={size}
      viewBox={d.viewBox}
      fill="none"
      style={style}
      // body strings are emitter-controlled <path> markup — geometry only.
      dangerouslySetInnerHTML={{ __html: d.body }}
      {...rest}
    />
  );
}
export default Interface;
