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

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

/** IEC ceiling light: circle with cross pattern inside. */
export function CeilingLightSymbol({ x, y, rotation, color, scale }: CeilingLightSymbolProps) {
  const r = 10 * scale;

  return (
    <Group x={x} y={y} rotation={rotation}>
      <Circle radius={r} stroke={color} strokeWidth={1.5} fill="transparent" listening={false} />
      {/* Cross pattern */}
      <Line points={[-r, 0, r, 0]} stroke={color} strokeWidth={1.2} listening={false} />
      <Line points={[0, -r, 0, r]} stroke={color} strokeWidth={1.2} listening={false} />
    </Group>
  );
}
