import { LitElement, ReactiveController, ReactiveControllerHost } from 'lit';
import { QueryController } from './query-controller';
import { NotificationsResultType, NotificationTypes } from '../types/notifications.types';
import { ContextConsumer } from '@lit/context';
import { WeavyType } from '../contexts/weavy-context';
import { getMarkNotificationsMutation } from '../data/notifications';
import { QueryObserverResult } from '@tanstack/query-core';
export interface UnreadNotificationsProps {
    /**
     * Number of unread notifications.
     */
    readonly unread: number;
    /**
     * Marks all notifications as read.
     */
    markAllAsRead: () => Promise<void>;
}
export interface NotificationFilterProps {
    /**
     * Optional app id for unread scoping.
     */
    appId?: number;
    /**
     * Type of notifications for the scope.
     *
     * @type "" | "activity" | "mention" | "reaction"
     */
    typeFilter: NotificationTypes;
}
/**
 * Lit element controller for Notification live data.
 *
 * - Requires a weavy context.
 * - May be filtered for different notification types and app id scopes.
 *
 * @fires {WyUnreadEventType} wy-unread - Emitted when the number of unread notifications change.
 */
export declare class UnreadNotificationsController implements ReactiveController, UnreadNotificationsProps, NotificationFilterProps {
    #private;
    host: LitElement & ReactiveControllerHost;
    /**
     * Optional app id for unread scoping.
     */
    appId?: number;
    /**
     * Type of notifications for the scope.
     *
     * @type "" | "activity" | "mention" | "reaction"
     */
    typeFilter: NotificationTypes;
    /**
     * The number of unread notifications for the current scope
     */
    get unread(): number;
    /**
     * Is the unread count pending?
     */
    get isUnreadPending(): boolean;
    /**
     * The underlying query result for the unread count.
     */
    get unreadResult(): QueryObserverResult<NotificationsResultType>;
    protected unreadQuery: QueryController<NotificationsResultType>;
    protected markNotificationsMutation?: ReturnType<typeof getMarkNotificationsMutation>;
    protected registrationRequested: boolean;
    protected weavyContext?: ContextConsumer<{
        __context__: WeavyType;
    }, LitElement>;
    protected whenWeavyContext: Promise<WeavyType>;
    protected resolveWeavyContext?: (value: WeavyType | PromiseLike<WeavyType>) => void;
    protected get weavy(): WeavyType | undefined;
    constructor(host: LitElement);
    /**
     * Initiates context consumers
     */
    setContexts(): Promise<void>;
    /**
     * Dispatch a `wy-unread` event on the host.
     *
     * @fires {WyUnreadEventType} wy-unread - Emitted when the number of unread notifications change.
     */
    dispatchNotificationUnreadEvent(): void;
    /**
     * Request an update of the notification query data.
     */
    private handleRefresh;
    /**
     * Register realtime handlers.
     */
    registerRealtime(): Promise<void>;
    /**
     * Unregister realtime handlers.
     *
     * @param skipAwait - Skip waiting for any context.
     */
    unregisterRealtime(skipAwait?: boolean): Promise<void>;
    /**
     * Tracks unread data. Initiates the query data with the given filtering scope.
     *
     * @param typeFilter - The notification types to track.
     * @param appId - Optional app id for the filtering scope.
     */
    track(typeFilter: NotificationTypes, appId?: number): Promise<void>;
    markAllAsRead(): Promise<void>;
    hostUpdate(): void;
    hostDisconnected(): void;
}
//# sourceMappingURL=unread-notifications-controller.d.ts.map