import { LitElement, PropertyValueMap } from "lit"; import { ReactionInfoStyle } from "./ReactionInfoStyle"; export declare class CometChatReactionInfo extends LitElement { messageObject: CometChat.BaseMessage; reaction: string; loadingIconURL?: string; errorIconURL?: string; reactionsRequestBuilder?: CometChat.ReactionsRequestBuilder; reactionInfoStyle: ReactionInfoStyle; static styles: import("lit").CSSResult[]; private reactionNames; private totalReactions; private state; private reactedText; private andText; private othersText; private youText; private limit; private loggedInUser; private isInteracting; private hasMessageUpdated; private observer; render(): import("lit-html").TemplateResult<1>; connectedCallback(): void; protected updated(_changedProperties: PropertyValueMap | Map): void; /** * Resets the elements of the CometChatReactionInfo class. */ private resetElements; /** * Checks the visibility of the element using IntersectionObserver. * If the element is intersecting with the viewport, sets isInteracting to true and fetches reactions on interaction. */ private checkVisibilityOfElement; /** * Called when the custom element is disconnected from the document's DOM. * It is a lifecycle method that is automatically invoked by the browser. * This method is responsible for cleaning up any resources or event listeners * that were set up in the connectedCallback method. */ disconnectedCallback(): void; /** * Fetches reactions on interaction. * If there is a message update and the component is currently interacting, * it resets the message update flag, sets the interacting flag to false, * clears the reaction names array, and fetches reactions. * If the component is only interacting, it checks the state. * If the state is error or loading, it clears the reaction names array and fetches reactions. * Finally, it sets the interacting flag to false. */ private fetchReactionsOnInteraction; /** * Returns the error state view for the reaction info. * @returns {TemplateResult} The error state view. */ private getErrorStateView; /** * Returns the loading state view. * @returns {TemplateResult} The loading state view. */ private getLoadingStateView; /** * Returns the loaded state view for the CometChatReactionInfo component. * * @returns {TemplateResult} The loaded state view HTML template. */ private getLoadedStateView; /** * Fetches reactions for the message. * If the reaction names are already present, it updates the component with the existing names. * Otherwise, it fetches the reactions using the provided builder and updates the component with the fetched reaction names. * @returns {Promise} A promise that resolves once the reactions are fetched and the component is updated. */ private fetchReactions; /** * Retrieves the total count of a specific reaction for the message. * @returns The total count of the specific reaction. Returns 0 if the reaction is not found. */ private getTotalReactionCount; /** * Returns the style object for the name in the reaction info. * @param style - The style object containing font and color properties. * @returns The style object for the name. */ private getNameStyle; /** * Returns the style object for the emoji. * @param style - The style object containing the reaction font size. * @returns The style object with the specified font size. */ private getEmojiStyle; /** * Returns the container style for the reaction info. * @param style - The style object containing the height, width, borderRadius, background, and border properties. * @returns The container style object. */ private getContainerStyle; } declare global { namespace JSX { interface IntrinsicElements { "cometchat-reaction-info": any; } } interface HTMLElementTagNameMap { "cometchat-reaction-info": any; } } //# sourceMappingURL=CometChatReactionInfo.d.ts.map