/**
 * KYLE @ ADOM — LED nameplate badge
 * A tiny 45 x 16 mm board: 2-pin header → 4 LEDs (one per letter),
 * each with its own 330 Ω current-limiting resistor.
 */
export default () => (
  <board width="45mm" height="16mm" name="kyle_nameplate">
    {/* Power in */}
    <pinheader
      name="J1"
      pinCount={2}
      footprint="pinrow2"
      pcbX={-20}
      pcbY={0}
      pinLabels={["VCC", "GND"]}
    />

    {/* Four LED + resistor pairs, evenly spaced across the badge */}
    {["K", "Y", "L", "E"].map((letter, i) => {
      const x = -9 + i * 6
      return (
        <group key={letter}>
          <resistor
            name={`R${i + 1}`}
            resistance="330"
            footprint="0603"
            pcbX={x}
            pcbY={3}
          />
          <led
            name={`D${i + 1}`}
            color="red"
            footprint="0603"
            pcbX={x}
            pcbY={-3}
          />
          <trace from={`.R${i + 1} > .pin2`} to={`.D${i + 1} > .anode`} />
          <trace from={`.R${i + 1} > .pin1`} to=".J1 > .VCC" />
          <trace from={`.D${i + 1} > .cathode`} to=".J1 > .GND" />
        </group>
      )
    })}
  </board>
)