import { nothing, PropertyValueMap } from 'lit'; import { WeavySubComponent } from '../classes/weavy-sub-component'; import { ShadowPartsController } from '../controllers/shadow-parts-controller'; import { AppType } from '../types/app.types'; declare global { interface HTMLElementTagNameMap { "wy-conversation-header": WyConversationHeader; } } /** * Header section for a conversation. Displays title and optional conversation details with possibility to edit. * * **Used sub components** * * - [``](./ui/wy-avatar.ts) * - [``](./ui/wy-avatar.ts) * - [``](./ui/wy-avatar.ts) * - [``](./ui/wy-button.ts) * - [``](./ui/wy-dropdown.ts) * - [``](./ui/wy-dropdown.ts) * - [``](./ui/wy-icon.ts) * - [``](./ui/wy-item.ts) * - [``](./ui/wy-item.ts) * - [``](./ui/wy-presence.ts) * - [``](./ui/wy-titlebar.ts) * - [``](./ui/wy-titlebar.ts) * - [``](./ui/wy-overlay.ts) * - [``](./wy-upload.ts) * - [``](./wy-users-search.ts) * * @slot icon - Icon or button to display in the beginning of the header. * * @csspart wy-conversation-titlebar - The titlebar for the conversation. * @csspart wy-conversation-details - The conversation details overlay modal. * @csspart wy-conversation-add-members - The add members overlay modal. * @csspart wy-scroll-y - Scrollable content area inside the details overlay. * @csspart wy-pane-group - Grouping wrapper for room details fields. * @csspart wy-label - Labels for inputs in the details view. * @csspart wy-input - Inputs (room name) in the details view. * @csspart wy-description - Description/help text in the details view. * @csspart wy-conversation-details-add-members-action - Menu item for opening the add-members flow. * * @fires {WyActionEventType} wy-action - Emitted when the conversation is deselected/cleared. */ export declare class WyConversationHeader extends WeavySubComponent { #private; static styles: import('lit').CSSResult[]; /** * Controller for exporting named shadow parts. * * @internal */ protected exportParts: ShadowPartsController; /** * The id of the current conversation. * * Set this to load or target a specific conversation. */ conversationId?: number; /** * Conversation data object for the current conversation. */ conversation?: AppType; /** * Whether to show the details modal. * * @internal */ protected showDetails: boolean; /** * Whether to show the add members modal. * * @internal */ protected showAddMembers: boolean; /** * The title of the conversation. * * @internal */ protected conversationTitle: string; /** * State for the conversation title input. * * @internal */ protected conversationTitleInput: string; /** Checks whether the current or provided conversation is an agent chat. */ protected isAgentChat(conversation?: AppType): boolean; /** Checks whether the current or provided conversation is a chat room. */ protected isChatRoom(conversation?: AppType): boolean; /** Checks whether the current or provided conversation is a private chat. */ protected isPrivateChat(conversation?: AppType): boolean; /** * Query controller for loading members of the conversation. * * @internal */ private membersQuery; /** * Mutation for adding members to a conversation. * * @internal */ private addMembersMutation?; /** * Mutation for leaving a conversation. * * @internal */ private leaveConversationMutation?; /** * Mutation for updating a member's access. * * @internal */ private updateMemberMutation?; /** * Mutation for updating conversation properties (name/avatar). * * @internal */ private updateConversationMutation?; /** * Handler invoked when an app update realtime event is received for the current conversation. * * Updates the local title state from the realtime payload. * * @internal */ private handleRealtimeAppUpdated; /** * Adds a list of members to the conversation. * * @internal */ private addMembers; /** * Handles saving the conversation name from the conversation name input. * * @internal */ private handleSaveConversationName; /** * Updates the avatar with an uploaded blob picture. * * @internal */ private handleAvatarUploaded; /** * Clears the set avatar for the conversation. * * @internal */ private clearAvatar; /** * Updates the access for a member in the conversation. * * @internal */ private updateMember; /** * Removes the current or provided member from the conversation. * * If no memberId is provided, the current user leaves the conversation and the component state is cleared. * * @internal */ private leaveConversation; /** * Updates member presence data from realtime presence events. * * @internal */ private handlePresenceChange; protected willUpdate(changedProperties: PropertyValueMap): Promise; render(): import('../../node_modules/lit-html/node/lit-html.js').TemplateResult<1> | typeof nothing; disconnectedCallback(): void; } //# sourceMappingURL=wy-conversation-header.d.ts.map