'use client' import { CalendarIcon } from 'lucide-react' import { useCallback, useMemo, useState } from 'react' import { CalendarFeedDialog, type CalendarFeedSummary, type CreateCalendarFeedResult, } from '@/components/campaign/activity/CalendarFeedDialog' import { SetCampaignHeaderAction } from '@/components/campaign/shell/CampaignPageChromeContext' import { useBridgedQuickAction } from '@/components/campaign/shell/CampaignQuickActionContext' import { Button } from '@/components/ui/button' type AgendaFeedChromeProps = { feeds: CalendarFeedSummary[] onCreateFeed: (label: string) => Promise onRevokeFeed: (feedId: number) => Promise<{ ok: boolean }> } /** * Agenda page → app chrome bridge for the calendar-feed surface (C94, gate * unlocked by C93): registers the desktop header icon (agenda-contextual), * exposes the sheet to the mobile FAB quick action and owns the single shared * dialog instance. */ export const AgendaFeedChrome = ({ feeds, onCreateFeed, onRevokeFeed }: AgendaFeedChromeProps) => { const [open, setOpen] = useState(false) const openFeed = useCallback(() => setOpen(true), []) useBridgedQuickAction('openCalendarFeed', openFeed) const headerButton = useMemo( () => ( ), [openFeed], ) return ( <> {headerButton} ) }