import { IMessageModel } from '@tencentcloud/chat-uikit-engine';
import { ITUINotification, INotificationConstructorParams } from './interface';

/**
   * The TUINotification class.
   * Just can use in web environment.
   * @extends {ITUINotification}
   * @param {INotificationConstructorParams | undefined} params - An optional parameter specifying the options for creating the TUINotification instance.
   * @return {TUINotification} - The instance of TUINotification.
   * @example
   * TUINotification.setNotificationConfiguration({
   *   showPreviews: true,
   *   allowNotifications: true
   * });
   * TUINotification.getInstance(config).notify(message);
   */
declare class TUINotification implements ITUINotification {
    showPreviews: boolean;
    allowNotifications: boolean;
    notificationTitle: string;
    notificationIcon: string;
    private static instance;
    private constructor();
    /**
       * Returns an instance of TUINotification.
       *
       * @param {INotificationConstructorParams | undefined} options - An optional parameter specifying the options for creating the TUINotification instance.
       * @return {TUINotification} - The instance of TUINotification.
       */
    static getInstance(options?: INotificationConstructorParams): TUINotification;
    /**
       * Notifies the user with a given message.
       *
       * @param {IMessageModel} message - The message to be notified.
       * @return {Promise<void>} - A promise that resolves when the notification is handled.
       */
    notify(message: IMessageModel): Promise<void>;
    /**
       * Handles the notification message.
       *
       * @param {IMessageModel} message - The notification message to handle.
       * @return {Promise<void>} - A Promise that resolves once the notification is handled.
       */
    handleNotification(message: IMessageModel): Promise<void>;
    /**
       * Sets the notification configuration.
       *
       * @param {INotificationConstructorParams} params - The parameters for the notification configuration.
       * @return {void} This function does not return a value.
       */
    setNotificationConfiguration(params?: INotificationConstructorParams): void;
    /**
       * Checks if the browser supports notifications.
       *
       * @return {boolean} true if the browser supports notifications, false otherwise.
       */
    checkNotificationAbility(): boolean;
    /**
       * Checks if the browser has notification capability
       * If the browser already has notification permission, returns true
       * Otherwise, requests permission and returns the result
       * @return Promise<boolean>
       */
    requestNotificationPermission(): Promise<boolean>;
    /**
       * Checks if the current page has focus.
       * @return {boolean}
       */
    checkPageFocus(): boolean;
    /**
       * use new configuration to overwrite old configuration
       * @param params
       * @return {void}
       */
    private setConfiguration;
    /**
       * Checks if a message needs to be notified.
       *
       * A message does not need to be notified if it:
       *  - is null or undefined
       *  - does not have an ID or a type
       *  - is revoked or deleted
       *  - is a typing message
       *  - is of type MSG_GRP_TIP or MSG_GRP_SYS_NOTICE
       *  - the page is focused and the message belongs to the current conversation
       *
       * @param {IMessageModel} message - The message to check
       * @return {boolean} - True if the message needs to be notified, false otherwise
       */
    private isMessageNeedNotification;
    /**
       * Returns the notification type 'call' or 'chat'.
       * @param {IMessageModel} message
       * @return {'chat' | 'call'} call' or 'chat'
       */
    private getNotificationType;
    /**
       * Retrieves the content for chat type message notifications.
       * @param {IMessageModel} message
       * @return {Promise<string>}
       */
    private getChatNotificationContent;
    /**
       * Retrieves the content title for chat notifications.
       * @param {IMessageModel} message - The message object.
       * @returns {Promise<string>} - The content title for chat notifications.
       */
    private getChatNotificationContentTitle;
    /**
       * Get the content of the chat notification
       * @param {IMessageModel} message
       * @return {string}
       */
    private getChatNotificationContentText;
    /**
       * Get the content of the call notification.
       * @param message - The message object.
       * @returns An object containing the notification content and call end status.
       */
    private getCallNotificationInfo;
}
declare const _default: TUINotification;
export default _default;
