/** * useSitePresence Hook * * Provides site-level presence aggregation with polling. */ import type { SitePresence, BranchPresenceSummary } from '@pantheon-systems/css-client'; /** * Options for the useSitePresence hook. */ export interface UseSitePresenceOptions { /** Polling interval in ms (default: 10000) */ pollingInterval?: number; } /** * Return value for the useSitePresence hook. */ export interface UseSitePresenceReturn { /** Site presence summary */ presence: SitePresence | null; /** Branches with active collaborators */ activeBranches: BranchPresenceSummary[]; /** Total collaborators across site */ totalActors: number; /** Loading state */ isLoading: boolean; /** Error state */ error: Error | null; /** Refresh presence data */ refresh: () => Promise; } /** * Hook for consuming site-level presence data. * * @param options - Configuration options * @returns Site presence state and operations * * @example * ```tsx * function SiteCollaborators() { * const { presence, activeBranches, totalActors } = useSitePresence(); * * return ( *
* {totalActors} collaborators on this site * {activeBranches.map(branch => ( * * ))} *
* ); * } * ``` */ export declare function useSitePresence(options?: UseSitePresenceOptions): UseSitePresenceReturn;