import type { ComputedRef } from 'vue'; import type { NuxtApp } from 'nuxt/app'; import type { MercureStore } from '../storage/stores/mercure/mercure-store.js'; import type { ResourcesStore } from '../storage/stores/resources/resources-store.js'; import type { FetcherStore } from '../storage/stores/fetcher/fetcher-store.js'; import type Fetcher from './fetcher/fetcher.js'; export default class MercureClient { private readonly nuxtApp?; private eventSource?; private lastEventId?; private onlineListenerAttached; private mercureMessageQueue; private fetcher?; private requestCount?; private readonly _mercureStore; private readonly _resourcesStore; private readonly _fetcherStore; private realtime?; private presence?; private realtimeWatch?; constructor(mercureStoreDefinition: MercureStore, resourcesStoreDefinition: ResourcesStore, fetcherStoreDefinition: FetcherStore, nuxtApp?: NuxtApp | undefined); setFetcher(fetcher: Fetcher): void; setRequestCount(requestCount: ComputedRef): void; init(forceRestart?: boolean): void; private get cwa(); private realtimeAllowed; private syncRealtime; private save; private isOlderThanStored; private listenForOnline; private handleConnectionLost; private handleConnectionOpen; private revalidateCurrentResources; closeMercure(): void; private get requestsInProgress(); private handleMercureMessage; private isMessageForCurrentResource; private addMercureMessageToQueue; private processMessageQueue; private collectResourceActions; private unheldPositionComponents; private positionsBoundToChangedPageData; private fetch; private get hubUrl(); private get hub(); private get mercureStore(); private get resourcesStore(); }