import { EventProviderFactory, EventProviderStatus } from "./event";
import { AttributeRef, SharedEvent } from "@openremote/model";
declare type Constructor<T = {}> = new (...args: any[]) => T;
interface CustomElement {
    requestUpdate(name?: PropertyKey, oldValue?: unknown): void;
    connectedCallback?(): void;
    disconnectedCallback?(): void;
    readonly isConnected: boolean;
}
export declare const subscribe: (eventProviderFactory: EventProviderFactory) => <T extends Constructor<CustomElement>>(base: T) => {
    new (...args: any[]): {
        _connectRequested: boolean;
        _subscriptionIds?: string[];
        _assetIds?: string[];
        _attributeRefs?: AttributeRef[];
        _status: EventProviderStatus;
        _statusCallback: (status: EventProviderStatus) => void;
        connectedCallback(): void;
        disconnectedCallback(): void;
        connectEvents(): void;
        disconnectEvents(): void;
        _doConnect(): Promise<void>;
        readonly eventsConnected: boolean;
        _onEventProviderStatusChanged(status: EventProviderStatus): void;
        _onEventsConnect(): void;
        _onEventsDisconnect(): void;
        /**
         * Defaults to subscribe to attribute events and optionally asset events, override in subclasses to do
         * custom subscriptions.
         * Returns the subscription IDs of any created subscriptions
         */
        _addEventSubscriptions(): Promise<void>;
        _removeEventSubscriptions(): void;
        _refreshEventSubscriptions(): void;
        assetIds: string[] | undefined;
        attributeRefs: AttributeRef[] | undefined;
        _sendEvent(event: SharedEvent): void;
        _sendEventWithReply<U extends SharedEvent, V extends SharedEvent>(event: U): Promise<V>;
        onEventsConnect(): void;
        onEventsDisconnect(): void;
        _onEvent(event: SharedEvent): void;
        requestUpdate(name?: PropertyKey, oldValue?: unknown): void;
        readonly isConnected: boolean;
    };
} & T;
export {};
//# sourceMappingURL=asset-mixin.d.ts.map