Build a Traffic Light component in React.
Requirements:
- Display three lights: green, yellow, and red.
- Lights should switch automatically in the order: green → yellow → red → green → ...
- Each light should stay on for a predetermined interval (e.g., green 3s, yellow 1s, red 2s).
- Loop indefinitely.
- Focus on functionality over styling.
- The component should work out-of-the-box in a live React preview (e.g., CodeSandbox/Sandpack).