import { AvatarStyle, ListItemStyle } from "@cometchat/uikit-elements"; import { LitElement } from "lit"; import { ReactionListStyle } from "./ReactionListStyle"; export declare class CometChatReactionList extends LitElement { messageObject: CometChat.BaseMessage; reactionListStyle: ReactionListStyle; reactionsRequestBuilder?: CometChat.ReactionsRequestBuilder; loadingIconURL?: string; errorIconURL?: string; avatarStyle: AvatarStyle; listItemStyle: ListItemStyle; reactionItemClicked?: any; static styles: import("lit").CSSResult[]; private messageReactions; private selectedReaction; private requestBuilderMap; private reactionList; private state; private allText; private currentUIList; private subtitleText?; private youText?; private limit; private loggedInUser; private messageUpdated; private isInteracting; private observer; private removedReactionsIds; private isFirstRender; /** * Checks the reactions for the message object and assigns them to the messageReactions property. */ checkReaction(): void; render(): import("lit-html").TemplateResult<1>; /** * Returns the error state of the reaction list. * @returns {TemplateResult} The error state template. */ private getErrorState; /** * Returns the loading state of the reaction list. * @returns {TemplateResult} The loading state template. */ private getLoadingState; /** * Renders the reactions slider with reaction items. * @returns {React.ReactNode} The rendered reactions slider. */ private showReactionsSlider; connectedCallback(): void; disconnectedCallback(): void; updated(changedProperties: Map): void; /** * Connects the observer to the parent element and triggers the necessary actions based on intersection. */ private connectObserver; /** * Checks if reactions need to be shown and displays them if necessary. * @returns {Promise} A promise that resolves when reactions are shown. */ private showReactionsIfNeeded; /** * Resets the component to its initial state. */ private resetComponent; /** * Calculates the total count of reactions for the message. * @returns The total count of reactions. */ private getTotalReactionCount; /** * Shows the list of reactions. * @returns {Promise} A promise that resolves when the reaction list is displayed. */ private showReactions; /** * Returns the request builder for a specific reaction. * If the request builder for the given reaction already exists, it returns the existing one. * Otherwise, it creates a new request builder and sets the necessary properties. * * @param reaction - The reaction for which the request builder is needed. * @returns The request builder for the given reaction. */ private getRequestBuilder; /** * Retrieves the reaction list based on the provided request builder and reaction. * @param requestBuilder The request builder for fetching reactions. * @param reaction The reaction for which the list is to be retrieved. * @returns The reaction list. */ private getReactionList; /** * Returns the UI elements for the reaction list. * Filters out removed reactions and maps the remaining reactions to HTML elements. * @returns {HTMLElement[]} An array of HTML elements representing the reaction list UI. */ private getUI; /** * Checks if the reaction is made by the logged-in user. * @param reaction - The reaction to check. * @returns True if the reaction is made by the logged-in user, false otherwise. */ private isMyReaction; /** * Updates the message to remove a reaction locally. * @param reaction - The reaction to be removed. */ private updateMessageToRemoveReactionLocally; /** * Callback function to close the reaction list. */ private closeCallBack; /** * Checks if the parent element has a closeContentView function. * @returns The closeContentView function if it exists, otherwise undefined. */ private hasCloseCallBack; /** * Retrieves the reaction count based on the specified emoji. * * @param emoji - The emoji to search for. * @returns The reaction count for the specified emoji. */ private getReactionCountBasedOnEmoji; /** * Performs a scroll check to determine if the user has scrolled to the bottom of the element. * If the user has scrolled to the bottom, it triggers the fetchNext() method. * * @param e - The scroll event object. */ private performScrollCheck; /** * Fetches the next set of reaction items and updates the reaction list. * If the reaction list for the selected reaction is empty, it returns early. * Otherwise, it fetches the next set of items using the request builder, * appends them to the existing reaction list, updates the current UI list, * and triggers a request update. * @returns {Promise} A promise that resolves when the fetch and update process is complete. */ private fetchNext; } declare global { namespace JSX { interface IntrinsicElements { "cometchat-reaction-list": any; } } interface HTMLElementTagNameMap { "cometchat-reaction-list": any; } } //# sourceMappingURL=CometChatReactionList.d.ts.map