import { Group, Arc, Line } from 'react-konva';

interface WallLightSymbolProps {
  readonly x: number;
  readonly y: number;
  readonly rotation: number;
  readonly color: string;
  readonly scale: number;
}

/** IEC wall light: half-circle against wall (flat side toward wall). */
export function WallLightSymbol({ x, y, rotation, color, scale }: WallLightSymbolProps) {
  const r = 10 * scale;

  return (
    <Group x={x} y={y} rotation={rotation}>
      {/* Half circle — the flat side faces the wall */}
      <Arc
        innerRadius={0}
        outerRadius={r}
        angle={180}
        rotation={0}
        stroke={color}
        strokeWidth={1.5}
        fill="transparent"
        listening={false}
      />
      {/* Flat baseline along wall */}
      <Line points={[0, -r, 0, r]} stroke={color} strokeWidth={1.5} listening={false} />
    </Group>
  );
}
