import type {Kind} from "@/lib/plan";
const color=(k:Kind)=>k==="rj45"||k==="phone"?"#4a78a8":k.startsWith("switch")||k==="light"?"#a77628":k==="panel"?"#256459":"#c17232";
export function ElectricalSymbol({kind}:{kind:Kind}){const c=color(kind);return <g transform="scale(0.7)" stroke={c} strokeWidth="2" fill="var(--plan-room)">{kind==="panel"?<><rect x="-11" y="-14" width="22" height="28" rx="2"/><path d="M-5-8H5M-5-2H5M-5 4H5M-5 10H5"/></>:kind==="box"?<><rect x="-9" y="-9" width="18" height="18" rx="2"/><circle r="2" fill={c}/></>:kind==="light"?<><circle r="11"/><path d="m-8-8 16 16m-16 0 16-16"/></>:kind.startsWith("switch")?<><circle r="7"/><path d="m4-5 9-13"/>{kind!=="switch1"&&<path d="m-4-5-8-10"/>}<text y="23" fill={c} stroke="none" textAnchor="middle" fontSize="11">{kind.slice(6)}</text></>:kind==="rj45"||kind==="phone"?<><rect x="-10" y="-9" width="20" height="18" rx="2"/><text y="4" textAnchor="middle" fontSize="10" fill={c} stroke="none">{kind==="rj45"?"RJ":"T"}</text></>:<><circle r="10"/><path d="M-4-4v8m8-8v8"/>{kind==="double"&&<circle cx="15" r="8"/>}</>}</g>}
