/** Centralized geometry config for symbol types with programmatic rendering */

export const EPC_CONFIG = {
  iconFile: '/symbols/epc_icon.svg',
  leftBox: { x: 0, y: 0, w: 26, h: 20 },
  rightBox: { w: 10, h: 20 },
  lineWidth: 1.5,
  defaultWaypoints: [
    { x: 26, y: 10 },   // exit from left box center-right
    { x: 41.5, y: 10 }, // middle control point
    { x: 57, y: 10 },   // entry to right box center-left
  ],
} as const;

export const INDUCTION_CONFIG = {
  headWidth: 78,   // fixed display width of arrow head (px)
  // Arrow shape points as [xFrac of headW, yFrac of h] — derived from original SVG path
  arrowPoints: [
    [0.5552, 0.2832],  // top junction with strip
    [0.2946, 0.0106],  // top of arrow
    [0.0096, 0.3088],  // left point
    [0.6602, 0.9890],  // bottom of arrow
    [0.9331, 0.7035],  // small step
    [0.9154, 0.6849],  // bottom junction with strip
  ] as [number, number][],
  stripTopFrac: 0.2832,
  stripBottomFrac: 0.6849,
} as const;

export const PHOTOEYE_CONFIG = {
  leftCap: 8.2,     // fixed display px — left transmitter arrow
  rightCap: 4.2,    // fixed display px — right receiver cap
  defaultWidth: 56,  // original PE width
} as const;

export const CURVE_CONFIG = {
  // Fractions of display size, derived from SVG viewBox "-2 -2 104 104"
  // All curved SVGs have arc center at viewBox (0,100), outerR=95
  centerOffsetX: 2 / 104,     // arc center X offset from sym.x
  centerOffsetY: 102 / 104,   // arc center Y offset from sym.y
  outerRFrac: 95 / 104,       // outer radius as fraction of sym.w
  convBandWidth: 30,           // fixed band width — matches straight conveyor height
  chuteBandWidth: 30,          // fixed band width — matches straight chute height
} as const;
