import { LitElement, PropertyValueMap } from 'lit';
import { WeavyType } from '../contexts/weavy-context';
import { MsgType } from '../types/msg.types';
import { UserType } from '../types/users.types';
import { MembersResultType } from '../types/members.types';
import { ShadowPartsController } from '../controllers/shadow-parts-controller';
import { AppTypeGuid } from '../types/app.types';
declare global {
    interface HTMLElementTagNameMap {
        "wy-conversation-item": WyConversationItem;
    }
}
/**
 * Item display of a conversation for use in lists.
 *
 * **Used sub components**
 *
 * - [`<wy-button>`](./ui/wy-button.ts)
 * - [`<wy-dropdown>`](./ui/wy-dropdown.ts)
 * - [`<wy-dropdown-item>`](./ui/wy-dropdown.ts)
 * - [`<wy-icon>`](./ui/wy-icon.ts)
 * - [`<wy-item>`](./ui/wy-item.ts)
 * - [`<wy-avatar>`](./ui/wy-avatar.ts)
 * - [`<wy-avatar-group>`](./ui/wy-avatar.ts)
 * - [`<wy-typing>`](./wy-typing.ts)
 *
 * @csspart wy-conversation-item - The conversation item container (applied on the inner wy-item)
 *
 * @fires {SelectedEventType} selected - Emitted when the conversation item is selected.
 * @fires {StarEventType} star - Emitted when the star/unstar action is requested.
 * @fires {PinEventType} pin - Emitted when the pin/unpin action is requested.
 * @fires {MessagesMarkEventType} mark - Emitted when the conversation should be marked read/unread.
 * @fires {LeaveEventType} leave - Emitted when the current user requests to leave the conversation.
 * @fires {RemoveEventType} remove - Emitted when the conversation should be removed/deleted.
 * @fires {TrashEventType} trash - Emitted when the conversation should be trashed.
 */
export declare class WyConversationItem extends LitElement {
    #private;
    static styles: import('lit').CSSResult[];
    /**
     * Controller for exporting named shadow parts.
     *
     * @internal
     */
    protected exportParts: ShadowPartsController;
    /**
     * Weavy instance context.
     *
     * @internal
     */
    weavy?: WeavyType;
    /**
     * User context for the current authenticated user.
     *
     * @internal
     */
    user: UserType | undefined;
    /**
     * The id of the conversation.
     *
     * Use this to identify which conversation the item represents.
     */
    conversationId?: number;
    /**
     * Whether the conversation is unread.
     */
    unread: boolean;
    /**
     * Url to any custom avatar for the conversation. If omitted, member avatars are used.
     */
    avatarUrl?: string;
    /**
     * Whether the avatar should be hidden.
     */
    hideAvatar: boolean;
    /**
     * Any custom title for the conversation item.
     */
    name: string;
    /**
     * The type guid of the conversation.
     */
    type: AppTypeGuid;
    /**
     * Whether the conversation item is selected.
     */
    selected: boolean;
    /**
     * Whether the conversation is starred.
     */
    starred: boolean;
    /**
     * Whether the conversation is pinned.
     */
    pinned: boolean;
    /**
     * A list of members in the conversation.
     *
     * @internal
     */
    members: MembersResultType;
    /**
     * The last received message in the conversation.
     *
     * @internal
     */
    lastMessage?: MsgType;
    /**
     * Realtime handler for when new messages have been created.
     *
     * Updates last message and unread state in the query cache.
     *
     * @internal
     * @param realtimeEvent - Realtime message event data.
     */
    private handleMessageCreated;
    /**
     * Realtime handler for when conversations have been updated.
     *
     * @internal
     */
    private handleConversationUpdated;
    /**
     * Realtime handler for when conversations are marked as read/unread.
     *
     * @internal
     * @param realtimeEvent - Realtime app marked event data.
     */
    private handleConversationMarked;
    /**
     * Trigger `selected` event.
     *
     * @returns Whether the event was dispatched successfully.
     */
    dispatchSelected(): boolean | undefined;
    /**
     * Trigger `star` event.
     *
     * @param star - Whether the conversation should be starred.
     * @returns Whether the event was dispatched successfully.
     */
    dispatchStar(star: boolean): boolean | undefined;
    /**
     * Trigger `pin` event.
     *
     * @param pin - Whether the conversation should be pinned.
     * @returns Whether the event was dispatched successfully.
     *
     * @internal
     */
    private dispatchPin;
    /**
     * Trigger `mark` event for marking the conversation as read/unread.
     *
     * @param mark - Whether the conversation should be marked as read.
     * @returns Whether the event was dispatched successfully.
     *
     * @internal
     */
    private dispatchMarked;
    /**
     * Triggers `leave` event when the current user is leaving the conversation.
     *
     * @returns Whether the event was dispatched successfully.
     *
     * @internal
     */
    private dispatchLeaveConversation;
    /**
     * Triggers `remove` when the conversation should be removed.
     *
     * @returns Whether the event was dispatched successfully.
     *
     * @internal
     */
    private dispatchRemoveConversation;
    /**
     * Triggers `trash` event when the conversation should be trashed.
     *
     * @returns Whether the event was dispatched successfully.
     *
     * @internal
     */
    private dispatchTrashConversation;
    willUpdate(changedProperties: PropertyValueMap<this>): void;
    render(): import('../../node_modules/lit-html/node/lit-html.js').TemplateResult<1>;
    connectedCallback(): void;
    disconnectedCallback(): void;
}
//# sourceMappingURL=wy-conversation-item.d.ts.map