{isLive ? ( ) : ( )} {isLive ? 'Ao vivo agora' : 'Transmissão'}
{view.title}
{isLive ? (A transmissão começou.
) : ({view.description}
)} {!isLive && hasEventDetails ? (- {view.eventLabel}
- Horário da Bahia
A transmissão ainda não começou.
) : null}'use client' import { CalendarIcon, ExternalLinkIcon, MapPinIcon, VideoIcon } from 'lucide-react' import Image from 'next/image' import { CampaignFooter } from '@/components/CampaignFooter' import { CampaignPageHeader } from '@/components/CampaignPageHeader' import { SAFE_FOCUS } from '@/components/shareLink/menuControls' import { ShareLinkAgendaMenu } from '@/components/shareLink/ShareLinkAgendaMenu' import { ShareLinkShareMenu } from '@/components/shareLink/ShareLinkShareMenu' import { useShareLinkLiveTarget } from '@/components/shareLink/useShareLinkLiveTarget' import type { ShareLinkAnnouncementView } from '@/lib/shareLinkAnnouncement' import { cn } from '@/lib/utils' const PRIMARY_ACTION = cn( 'inline-flex min-h-14 w-full items-center justify-center gap-2.5 rounded-[10px] bg-(--pt-yellow) px-4', 'font-[family-name:var(--font-exo2)] text-lg font-black text-(--pt-yellow-ink) no-underline', 'shadow-[0_5px_0_#cfb900,0_10px_22px_rgb(0_0_0/12%)]', ) const PRIMARY_ACTION_DISABLED = cn( PRIMARY_ACTION, 'cursor-not-allowed bg-[#e7e2d5] text-[rgb(0_0_0/48%)] shadow-[0_3px_0_#cfc9bb]', ) /** * S29 — the public announcement page of a share link (design artefato cenas * 01–03): honest pre-broadcast state with a disabled "Entrar", date/location in * Bahia time, agenda and share options, and the live swap — the poll reads the * fresh "no ar" target every 30s (paused on hidden tabs) and flips the CTA * without a reload, so the place of the button never changes for whoever left * the page open. The link itself keeps redirecting after a reload; this page * only exists while nothing is on air. */ export const ShareLinkAnnouncement = ({ view }: { view: ShareLinkAnnouncementView }) => { const live = useShareLinkLiveTarget(view.slug) const isLive = live !== null const hasEventDetails = Boolean(view.eventLabel || view.location) return (
{isLive ? ( ) : ( )} {isLive ? 'Ao vivo agora' : 'Transmissão'}
A transmissão começou.
) : ({view.description}
)} {!isLive && hasEventDetails ? (A transmissão ainda não começou.
) : null}