import type { Categoria } from '../../../types' interface RuletaSVGProps { categorias: Categoria[] rotacion: number isSpinning: boolean onClick: () => void } export default function RuletaSVG({ categorias, rotacion, isSpinning, onClick }: RuletaSVGProps) { const cx = 200 const cy = 200 const r = 180 const total = categorias.length const angleStep = 360 / total function polarToCartesian(angle: number, radius: number) { const rad = (angle - 90) * (Math.PI / 180) return { x: cx + radius * Math.cos(rad), y: cy + radius * Math.sin(rad), } } function sectorPath(startAngle: number, endAngle: number) { const start = polarToCartesian(startAngle, r) const end = polarToCartesian(endAngle, r) const largeArc = endAngle - startAngle > 180 ? 1 : 0 return `M ${cx} ${cy} L ${start.x} ${start.y} A ${r} ${r} 0 ${largeArc} 1 ${end.x} ${end.y} Z` } return (