import type { IdCardWsClientMessage, IdCardWsEvent } from './hostAgent.js';
export declare function useHostAgentWs(): {
    ws: import("vue").ShallowRef<WebSocket | null, WebSocket | null>;
    wsConnected: import("vue").ComputedRef<boolean>;
    wsSubscribed: import("vue").ComputedRef<boolean>;
    wsReader: import("vue").ComputedRef<string | null>;
    wsWithPhoto: import("vue").ComputedRef<boolean>;
    wsLastMessage: import("vue").ComputedRef<{
        type: "monitor.subscribed";
        ok: boolean;
        reader?: string | null | undefined;
        withPhoto?: boolean | undefined;
    } | {
        type: "monitor.started";
        reader?: string | null | undefined;
    } | {
        type: "monitor.switchAck";
        ok: boolean;
        reader?: string | null | undefined;
    } | {
        type: "monitor.switched";
        reader?: string | null | undefined;
    } | {
        type: "monitor.unsubscribed";
        ok: boolean;
    } | {
        type: "pong";
        ts?: string | undefined;
    } | {
        type: "card.inserted";
        payload: {
            patient: {
                citizenId?: string | null | undefined;
                citizenIdVerified: boolean;
                dob?: string | null | undefined;
                dobPrecision?: "yearMonthDay" | "yearMonth" | "year" | string | undefined;
                gender?: string | null | undefined;
                meta?: import("./hostAgent.js").JsonMeta | null;
            };
            patientNames?: {
                nameType: string;
                prefix?: string | null | undefined;
                firstName: string;
                middleName?: string | null | undefined;
                lastName?: string | null | undefined;
                suffix?: string | null | undefined;
            }[] | null | undefined;
            patientAddresses?: {
                mrn?: string | null | undefined;
                addressType: string;
                text: string;
                place?: string | null | undefined;
                villageNo?: string | null | undefined;
                alleyWay?: string | null | undefined;
                alley?: string | null | undefined;
                street?: string | null | undefined;
                subDistrictCode?: string | null | undefined;
                districtCode?: string | null | undefined;
                provinceCode?: string | null | undefined;
            }[] | null | undefined;
            patientPhotos?: {
                photoSource?: string | null | undefined;
                base64String: string;
            }[] | null | undefined;
        };
    } | {
        type: "card.removed";
    } | {
        type: "card.error";
        message?: string | undefined;
    } | {
        type: "error";
        code?: string | undefined;
        message?: string | undefined;
    } | {
        [x: string]: any;
        type: string;
    } | null>;
    wsLastRaw: import("vue").ComputedRef<{
        readonly data: any;
        readonly lastEventId: string;
        readonly origin: string;
        readonly ports: readonly {
            close: {
                (): void;
                (): void;
            };
            postMessage: {
                (message: any, transfer: Transferable[]): void;
                (message: any, options?: StructuredSerializeOptions): void;
                (message: any, transfer: Transferable[]): void;
                (message: any, options?: StructuredSerializeOptions): void;
            };
            start: {
                (): void;
                (): void;
            };
            addEventListener: {
                <K extends keyof MessagePortEventMap>(type: K, listener: (this: MessagePort, ev: MessagePortEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
                (type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
                <K extends keyof MessagePortEventMap>(type: K, listener: (this: MessagePort, ev: MessagePortEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
                (type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
            };
            removeEventListener: {
                <K extends keyof MessagePortEventMap>(type: K, listener: (this: MessagePort, ev: MessagePortEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
                (type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
                <K extends keyof MessagePortEventMap>(type: K, listener: (this: MessagePort, ev: MessagePortEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
                (type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
            };
            dispatchEvent: {
                (event: Event): boolean;
                (event: Event): boolean;
            };
            onmessage: ((this: MessagePort, ev: MessageEvent) => any) | null;
            onmessageerror: ((this: MessagePort, ev: MessageEvent) => any) | null;
        }[];
        readonly source: Window | {
            close: {
                (): void;
                (): void;
            };
            postMessage: {
                (message: any, transfer: Transferable[]): void;
                (message: any, options?: StructuredSerializeOptions): void;
                (message: any, transfer: Transferable[]): void;
                (message: any, options?: StructuredSerializeOptions): void;
            };
            start: {
                (): void;
                (): void;
            };
            addEventListener: {
                <K extends keyof MessagePortEventMap>(type: K, listener: (this: MessagePort, ev: MessagePortEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
                (type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
                <K extends keyof MessagePortEventMap>(type: K, listener: (this: MessagePort, ev: MessagePortEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
                (type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
            };
            removeEventListener: {
                <K extends keyof MessagePortEventMap>(type: K, listener: (this: MessagePort, ev: MessagePortEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
                (type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
                <K extends keyof MessagePortEventMap>(type: K, listener: (this: MessagePort, ev: MessagePortEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
                (type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
            };
            dispatchEvent: {
                (event: Event): boolean;
                (event: Event): boolean;
            };
            onmessage: ((this: MessagePort, ev: MessageEvent) => any) | null;
            onmessageerror: ((this: MessagePort, ev: MessageEvent) => any) | null;
        } | {
            onstatechange: ((this: ServiceWorker, ev: Event) => any) | null;
            readonly scriptURL: string;
            readonly state: ServiceWorkerState;
            postMessage: {
                (message: any, transfer: Transferable[]): void;
                (message: any, options?: StructuredSerializeOptions): void;
                (message: any, transfer: Transferable[]): void;
                (message: any, options?: StructuredSerializeOptions): void;
            };
            addEventListener: {
                <K extends keyof ServiceWorkerEventMap>(type: K, listener: (this: ServiceWorker, ev: ServiceWorkerEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
                (type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
                <K extends keyof ServiceWorkerEventMap>(type: K, listener: (this: ServiceWorker, ev: ServiceWorkerEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
                (type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
            };
            removeEventListener: {
                <K extends keyof ServiceWorkerEventMap>(type: K, listener: (this: ServiceWorker, ev: ServiceWorkerEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
                (type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
                <K extends keyof ServiceWorkerEventMap>(type: K, listener: (this: ServiceWorker, ev: ServiceWorkerEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
                (type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
            };
            dispatchEvent: {
                (event: Event): boolean;
                (event: Event): boolean;
            };
            onerror: ((this: AbstractWorker, ev: ErrorEvent) => any) | null;
        } | null;
        initMessageEvent: {
            (type: string, bubbles?: boolean, cancelable?: boolean, data?: any, origin?: string, lastEventId?: string, source?: MessageEventSource | null, ports?: MessagePort[]): void;
            (type: string, bubbles?: boolean, cancelable?: boolean, data?: any, origin?: string, lastEventId?: string, source?: MessageEventSource | null, ports?: Iterable<MessagePort>): void;
            (type: string, bubbles?: boolean, cancelable?: boolean, data?: any, origin?: string, lastEventId?: string, source?: MessageEventSource | null, ports?: MessagePort[]): void;
        };
        readonly bubbles: boolean;
        cancelBubble: boolean;
        readonly cancelable: boolean;
        readonly composed: boolean;
        readonly currentTarget: {
            addEventListener: {
                (type: string, callback: EventListenerOrEventListenerObject | null, options?: AddEventListenerOptions | boolean): void;
                (type: string, callback: EventListenerOrEventListenerObject | null, options?: AddEventListenerOptions | boolean): void;
            };
            dispatchEvent: {
                (event: Event): boolean;
                (event: Event): boolean;
            };
            removeEventListener: {
                (type: string, callback: EventListenerOrEventListenerObject | null, options?: EventListenerOptions | boolean): void;
                (type: string, callback: EventListenerOrEventListenerObject | null, options?: EventListenerOptions | boolean): void;
            };
        } | null;
        readonly defaultPrevented: boolean;
        readonly eventPhase: number;
        readonly isTrusted: boolean;
        returnValue: boolean;
        readonly srcElement: {
            addEventListener: {
                (type: string, callback: EventListenerOrEventListenerObject | null, options?: AddEventListenerOptions | boolean): void;
                (type: string, callback: EventListenerOrEventListenerObject | null, options?: AddEventListenerOptions | boolean): void;
            };
            dispatchEvent: {
                (event: Event): boolean;
                (event: Event): boolean;
            };
            removeEventListener: {
                (type: string, callback: EventListenerOrEventListenerObject | null, options?: EventListenerOptions | boolean): void;
                (type: string, callback: EventListenerOrEventListenerObject | null, options?: EventListenerOptions | boolean): void;
            };
        } | null;
        readonly target: {
            addEventListener: {
                (type: string, callback: EventListenerOrEventListenerObject | null, options?: AddEventListenerOptions | boolean): void;
                (type: string, callback: EventListenerOrEventListenerObject | null, options?: AddEventListenerOptions | boolean): void;
            };
            dispatchEvent: {
                (event: Event): boolean;
                (event: Event): boolean;
            };
            removeEventListener: {
                (type: string, callback: EventListenerOrEventListenerObject | null, options?: EventListenerOptions | boolean): void;
                (type: string, callback: EventListenerOrEventListenerObject | null, options?: EventListenerOptions | boolean): void;
            };
        } | null;
        readonly timeStamp: DOMHighResTimeStamp;
        readonly type: string;
        composedPath: {
            (): EventTarget[];
            (): EventTarget[];
        };
        initEvent: {
            (type: string, bubbles?: boolean, cancelable?: boolean): void;
            (type: string, bubbles?: boolean, cancelable?: boolean): void;
        };
        preventDefault: {
            (): void;
            (): void;
        };
        stopImmediatePropagation: {
            (): void;
            (): void;
        };
        stopPropagation: {
            (): void;
            (): void;
        };
        readonly NONE: 0;
        readonly CAPTURING_PHASE: 1;
        readonly AT_TARGET: 2;
        readonly BUBBLING_PHASE: 3;
    } | null>;
    wsLastError: import("vue").ComputedRef<any>;
    connectIdCardWs: () => WebSocket;
    disconnectIdCardWs: (code?: number, reason?: string) => void;
    sendIdCardWs: (message: IdCardWsClientMessage) => void;
    subscribeIdCardWs: (params?: {
        reader?: string | null;
        withPhoto?: boolean;
    }) => void;
    pingIdCardWs: () => void;
    switchReaderIdCardWs: (reader?: string | null) => void;
    unsubscribeIdCardWs: () => void;
    onIdCardWsEvent: (cb: (ev: IdCardWsEvent) => void) => () => boolean;
};
