'use client' import Image from 'next/image' import { useEffect, useRef, useState } from 'react' import { cn } from '@/lib/utils' import { JINGLE_FOCUS_RING } from './focusRing' /** * S22 — the Rádio Jorge Solla 1313 card with a click-to-load facade * (artefato: cenas 01/02/03/04/07): the official zeno.fm widget is only mounted * after "Ouvir a rádio", so no third-party request, script or ad loads on the * home pageview. While the iframe answers, the reaction is `loading` * (`role="status"` + `aria-busy`), promoting to `loaded` on `onLoad`; the three * states share one reserved footprint, so nothing jumps (CLS). The external * link stays available in every state. `compact` is the Cena 07 variant: the * zero-jingles home narrows the card and drops the facade's intro and note. */ const RADIO_PAGE_URL = 'https://zeno.fm/radio/jorge-solla-1313/' const RADIO_PLAYER_URL = 'https://zeno.fm/player/jorge-solla-1313/' type RadioState = 'facade' | 'loading' | 'loaded' const ExternalLink = ({ className }: { className?: string }) => ( Abrir no Zeno ) const ShieldIcon = ({ className }: { className?: string }) => ( ) const RadioArt = ({ compact }: { compact?: boolean }) => (
Rádio online
Jorge Solla 1313 — Mais Saúde, Mais Futuro
) const RadioPanel = ({ className, ...props }: React.ComponentProps<'div'>) => (
) const FacadePlayButton = ({ onRequestPlayer }: { onRequestPlayer: () => void }) => ( ) const FacadePanel = ({ compact, onRequestPlayer, }: { compact?: boolean onRequestPlayer: () => void }) => ( {compact ? ( <>

Rádio Jorge Solla 1313

O player oficial só é carregado quando você pedir.

) : ( <>

Sintonize com a gente

Rádio Jorge Solla 1313

Carregue o player oficial só quando quiser ouvir. Clique para carregar o player oficial e ouvir a programação da rádio.

O player do zeno.fm só carrega depois do clique. O player do zeno.fm só é carregado depois do seu clique.

)}
) const LoadingPanel = ({ panelRef }: { panelRef?: React.Ref }) => (

Sintonize com a gente

Rádio Jorge Solla 1313

Carregando o player da rádio…

Isso pode levar alguns segundos.

) /** * Mounted at the click (with the iframe) but kept `hidden` until `onLoad`: * `display:none` does not stop the frame from loading, so the same element * survives the `loading → loaded` promotion and the widget never refetches. */ const LoadedPanel = ({ hidden, onLoaded }: { hidden: boolean; onLoaded: () => void }) => (

Rádio Jorge Solla 1313