import { WeavySubComponent } from '../classes/weavy-sub-component';
import { ShadowPartsController } from '../controllers/shadow-parts-controller';
import { MemberIdType } from '../types/members.types';
declare global {
    interface HTMLElementTagNameMap {
        "wy-conversation-new": WyConversationNew;
    }
}
/**
 * Button and dialog for creating new conversations.
 *
 * **Used sub components**
 *
 * - [`<wy-button>`](./ui/wy-button.ts)
 * - [`<wy-icon>`](./ui/wy-icon.ts)
 * - [`<wy-overlay>`](./ui/wy-overlay.ts)
 * - [`<wy-titlebar>`](./ui/wy-titlebar.ts)
 * - [`<wy-users-search>`](./wy-users-search.ts)
 *
 * @slot - Anything to replace the default button.
 *
 * @csspart wy-conversation-new-button - The button for creating a new conversation.
 * @csspart wy-conversation-new-dialog - The dialog overlay for creating a conversation.
 *
 * @fires {CreateConversationEventType} create - Emitted when a conversation should be created.
 */
export declare class WyConversationNew extends WeavySubComponent {
    static styles: import('lit').CSSResult[];
    /** @internal */
    protected exportParts: ShadowPartsController;
    /**
     * Internal resolver for the member selection promise.
     *
     * @internal
     */
    protected _resolveMembers?: (members: MemberIdType[]) => void;
    /**
     * Internal rejector for the member selection promise.
     *
     * @internal
     */
    protected _rejectMembers?: (reason?: string) => void;
    /**
     * Promise resolved when members are selected via the dialog.
     *
     * Consumers can await whenMembers() to get selected member ids.
     *
     * @internal
     */
    protected _whenMembers: Promise<MemberIdType[]>;
    /**
     * Resolves when members are selected from the modal.
     *
     * @returns Promise<MemberIdType[]>
     */
    whenMembers(): Promise<MemberIdType[]>;
    /**
     * Create an internal members promise and store resolve/reject handlers.
     *
     * @internal
     */
    protected createMembersPromise(): Promise<MemberIdType[]>;
    /**
     * Any agent uid
     *
     * When set, the component can create agent conversations directly.
     */
    agent?: string;
    /**
     * Whether the new conversation dialog is shown.
     *
     * @internal
     */
    private show;
    /**
     * Any elements in the general slot.
     *
     * @internal
     */
    private slotElements;
    /**
     * Open the new conversation dialog and return selected members.
     *
     * @returns Promise<MemberIdType[]>
     */
    selectMembers(): Promise<MemberIdType[]>;
    /**
     * Close the new conversation dialog and resolve or reject the selection promise.
     *
     * @internal
     * @param members - Optional selected member ids to resolve the promise with.
     */
    private close;
    /**
     * Create a conversation by dispatching a `create` event and closing the dialog.
     *
     * @param members - Array of members by id/uid for a new conversation.
     */
    private submit;
    render(): import('../../node_modules/lit-html/node/lit-html.js').TemplateResult<1>;
}
//# sourceMappingURL=wy-conversation-new.d.ts.map