import { type APIApplicationCommandAutocompleteInteraction, type APIApplicationCommandInteraction, type APIBaseInteraction, type APIChatInputApplicationCommandInteraction, type APIChatInputApplicationCommandInteractionData, type APICommandAutocompleteInteractionResponseCallbackData, type APIEntryPointCommandInteraction, type APIInteraction, type APIInteractionResponse, type APIInteractionResponseChannelMessageWithSource, type APIInteractionResponseDeferredChannelMessageWithSource, type APIInteractionResponseDeferredMessageUpdate, type APIInteractionResponsePong, type APIInteractionResponseUpdateMessage, type APIMessageApplicationCommandInteraction, type APIMessageApplicationCommandInteractionData, type APIMessageButtonInteractionData, type APIMessageComponentInteraction, type APIMessageComponentSelectMenuInteraction, type APIMessageStringSelectInteractionData, type APIModalSubmission, type APIModalSubmitInteraction, type APIUserApplicationCommandInteraction, type APIUserApplicationCommandInteractionData, ApplicationCommandType, ComponentType, type GatewayInteractionCreateDispatchData, type InteractionCallbackData, type InteractionCallbackResourceActivity, InteractionResponseType, InteractionType, type MessageFlags, type RESTPostAPIInteractionCallbackJSONBody, type RESTPostAPIInteractionCallbackResult } from '../types';
import type { RawFile } from '../api';
import { type EntitlementStructure, type GuildRoleStructure, type GuildStructure, type InteractionGuildMemberStructure, type MessageStructure, type OptionResolverStructure, type UserStructure, type WebhookMessageStructure } from '../client/transformers';
import type { UsingClient } from '../commands';
import { type ComponentInteractionMessageUpdate, type InteractionCreateBodyRequest, type InteractionMessageUpdateBodyRequest, type MessageCreateBodyRequest, type MessageUpdateBodyRequest, type MessageWebhookCreateBodyRequest, type ModalCreateBodyRequest, type ObjectToLower, type OmitInsert, type ToClass, type When } from '../common';
import { type AllChannels } from './';
import { DiscordBase } from './extra/DiscordBase';
import { PermissionsBitField } from './extra/Permissions';
export type ReplyInteractionBody = {
    type: InteractionResponseType.Modal;
    data: ModalCreateBodyRequest;
} | {
    type: InteractionResponseType.ChannelMessageWithSource | InteractionResponseType.UpdateMessage;
    data: InteractionCreateBodyRequest | InteractionMessageUpdateBodyRequest | ComponentInteractionMessageUpdate;
} | {
    type: InteractionResponseType.LaunchActivity;
} | Exclude<RESTPostAPIInteractionCallbackJSONBody, APIInteractionResponsePong>;
export type __InternalReplyFunction = (_: {
    body: APIInteractionResponse;
    files?: RawFile[];
}) => Promise<any>;
export interface BaseInteraction extends ObjectToLower<Omit<APIBaseInteraction<InteractionType, any>, 'user' | 'member' | 'message' | 'channel' | 'type' | 'app_permissions'>> {
}
export declare class BaseInteraction<FromGuild extends boolean = boolean, Type extends APIInteraction = APIInteraction> extends DiscordBase<Type> {
    readonly client: UsingClient;
    protected __reply?: __InternalReplyFunction | undefined;
    user: UserStructure;
    member: When<FromGuild, InteractionGuildMemberStructure, undefined>;
    channel?: AllChannels;
    message?: MessageStructure;
    replied?: Promise<boolean | RESTPostAPIInteractionCallbackResult | undefined> | boolean;
    appPermissions: PermissionsBitField;
    entitlements: EntitlementStructure[];
    constructor(client: UsingClient, interaction: Type, __reply?: __InternalReplyFunction | undefined);
    static transformBodyRequest(body: ReplyInteractionBody, files: RawFile[] | undefined, self: UsingClient): APIInteractionResponse;
    static transformBody<T>(body: InteractionCreateBodyRequest | InteractionMessageUpdateBodyRequest | MessageUpdateBodyRequest | MessageCreateBodyRequest | MessageWebhookCreateBodyRequest, files: RawFile[] | undefined, self: UsingClient): T;
    private matchReplied;
    reply<WR extends boolean = false>(body: ReplyInteractionBody, withResponse?: WR): Promise<When<WR, WebhookMessageStructure, undefined>>;
    deferReply<WR extends boolean = false>(flags?: MessageFlags, withResponse?: WR): Promise<When<WR, WebhookMessageStructure, undefined>>;
    isButton(): this is ButtonInteraction;
    isChannelSelectMenu(): this is ChannelSelectMenuInteraction;
    isRoleSelectMenu(): this is RoleSelectMenuInteraction;
    isMentionableSelectMenu(): this is MentionableSelectMenuInteraction;
    isUserSelectMenu(): this is UserSelectMenuInteraction;
    isStringSelectMenu(): this is StringSelectMenuInteraction;
    isChatInput(): this is ChatInputCommandInteraction;
    isUser(): this is UserCommandInteraction;
    isMessage(): this is MessageCommandInteraction;
    isAutocomplete(): this is AutocompleteInteraction;
    isModal(): this is ModalSubmitInteraction;
    isEntryPoint(): this is EntryPointInteraction;
    static from(client: UsingClient, gateway: GatewayInteractionCreateDispatchData, __reply?: __InternalReplyFunction): RoleSelectMenuInteraction | UserSelectMenuInteraction | MentionableSelectMenuInteraction | ChannelSelectMenuInteraction | ChatInputCommandInteraction<boolean> | UserCommandInteraction<boolean> | MessageCommandInteraction<boolean> | ButtonInteraction | StringSelectMenuInteraction<string[]> | ModalSubmitInteraction<boolean> | AutocompleteInteraction<boolean> | BaseInteraction<boolean, import("../types").APIPingInteraction>;
    fetchGuild(force?: boolean): Promise<GuildStructure<'api'> | undefined>;
}
export type AllInteractions = AutocompleteInteraction | ChatInputCommandInteraction | UserCommandInteraction | MessageCommandInteraction | ComponentInteraction | SelectMenuInteraction | ModalSubmitInteraction | EntryPointInteraction | BaseInteraction;
export interface AutocompleteInteraction extends ObjectToLower<Omit<APIApplicationCommandAutocompleteInteraction, 'user' | 'member' | 'type' | 'data' | 'message' | 'channel' | 'app_permissions'>> {
}
export declare class AutocompleteInteraction<FromGuild extends boolean = boolean> extends BaseInteraction<FromGuild, APIApplicationCommandAutocompleteInteraction> {
    protected __reply?: __InternalReplyFunction | undefined;
    type: InteractionType.ApplicationCommandAutocomplete;
    data: ObjectToLower<APIApplicationCommandAutocompleteInteraction['data']>;
    options: OptionResolverStructure;
    entitlements: EntitlementStructure[];
    channel: AllChannels;
    constructor(client: UsingClient, interaction: APIApplicationCommandAutocompleteInteraction, resolver?: OptionResolverStructure, __reply?: __InternalReplyFunction | undefined);
    getInput(): string;
    respond(choices: APICommandAutocompleteInteractionResponseCallbackData['choices']): Promise<undefined>;
    isAutocomplete(): this is AutocompleteInteraction;
    /** @intenal */
    reply(..._args: unknown[]): Promise<any>;
}
export declare class Interaction<FromGuild extends boolean = boolean, Type extends APIInteraction = APIInteraction> extends BaseInteraction<FromGuild, Type> {
    channel: AllChannels;
    fetchMessage(messageId: string): Promise<WebhookMessageStructure>;
    fetchResponse(): Promise<WebhookMessageStructure>;
    write<FR extends boolean = false>(body: InteractionCreateBodyRequest, withResponse?: FR): Promise<When<FR, WebhookMessageStructure, void>>;
    modal(body: ModalCreateBodyRequest): Promise<undefined>;
    editOrReply<FR extends boolean = false>(body: InteractionCreateBodyRequest, fetchReply?: FR): Promise<When<FR, WebhookMessageStructure, void>>;
    editMessage(messageId: string, body: InteractionMessageUpdateBodyRequest): Promise<WebhookMessageStructure>;
    editResponse(body: InteractionMessageUpdateBodyRequest): Promise<WebhookMessageStructure>;
    deleteResponse(): Promise<void>;
    deleteMessage(messageId: string): Promise<void>;
    followup(body: MessageWebhookCreateBodyRequest): Promise<WebhookMessageStructure>;
}
export declare class ApplicationCommandInteraction<FromGuild extends boolean = boolean, Type extends APIApplicationCommandInteraction = APIApplicationCommandInteraction> extends Interaction<FromGuild, Type> {
    type: ApplicationCommandType;
    channel: AllChannels;
    respond(data: APIInteractionResponseChannelMessageWithSource | APIInteractionResponseDeferredChannelMessageWithSource | APIInteractionResponseDeferredMessageUpdate | APIInteractionResponseUpdateMessage): Promise<undefined>;
}
/**
 * Seyfert don't support activities, so this interaction is blank
 */
export declare class EntryPointInteraction<FromGuild extends boolean = boolean> extends ApplicationCommandInteraction<FromGuild, APIEntryPointCommandInteraction> {
    channel: AllChannels;
    withReponse(data?: InteractionCreateBodyRequest): Promise<EntryPointWithResponseResult>;
    isEntryPoint(): this is EntryPointInteraction;
}
export interface EntryPointWithResponseResult {
    interaction: ObjectToLower<InteractionCallbackData>;
    resource?: {
        type: InteractionResponseType.LaunchActivity;
        activityInstance: InteractionCallbackResourceActivity;
    } | {
        type: Exclude<InteractionResponseType, InteractionResponseType.LaunchActivity>;
        message: WebhookMessageStructure;
    };
}
export interface ComponentInteraction extends ObjectToLower<Omit<APIMessageComponentInteraction, 'user' | 'member' | 'type' | 'data' | 'message' | 'channel' | 'app_permissions'>> {
}
export declare class ComponentInteraction<FromGuild extends boolean = boolean, Type extends APIMessageComponentInteraction = APIMessageComponentInteraction> extends Interaction<FromGuild, Type> {
    data: ObjectToLower<APIMessageComponentInteraction['data']>;
    channel: AllChannels;
    type: InteractionType.MessageComponent;
    message: MessageStructure;
    entitlements: EntitlementStructure[];
    update(data: ComponentInteractionMessageUpdate): Promise<undefined>;
    deferUpdate(): Promise<undefined>;
    get customId(): string;
    get componentType(): ComponentType.Button | ComponentType.StringSelect | ComponentType.UserSelect | ComponentType.RoleSelect | ComponentType.MentionableSelect | ComponentType.ChannelSelect;
}
export declare class ButtonInteraction extends ComponentInteraction {
    data: ObjectToLower<APIMessageButtonInteractionData>;
    isButton(): this is ButtonInteraction;
}
export declare class SelectMenuInteraction extends ComponentInteraction {
    protected __reply?: __InternalReplyFunction | undefined;
    data: ObjectToLower<APIMessageComponentSelectMenuInteraction['data']>;
    channel: AllChannels;
    constructor(client: UsingClient, interaction: APIMessageComponentSelectMenuInteraction, __reply?: __InternalReplyFunction | undefined);
    get values(): string[];
}
declare const StringSelectMenuInteraction_base: ToClass<Omit<SelectMenuInteraction, "data" | "isStringSelectMenu">, StringSelectMenuInteraction>;
export declare class StringSelectMenuInteraction<T extends any[] = string[]> extends StringSelectMenuInteraction_base {
    data: OmitInsert<ObjectToLower<APIMessageStringSelectInteractionData>, 'values', {
        values: T;
    }>;
    values: T;
    channel: AllChannels;
    isStringSelectMenu(): this is StringSelectMenuInteraction;
}
export declare class ChannelSelectMenuInteraction extends SelectMenuInteraction {
    protected __reply?: __InternalReplyFunction | undefined;
    channels: AllChannels[];
    channel: AllChannels;
    constructor(client: UsingClient, interaction: APIMessageComponentSelectMenuInteraction, __reply?: __InternalReplyFunction | undefined);
    isChannelSelectMenu(): this is ChannelSelectMenuInteraction;
}
export declare class MentionableSelectMenuInteraction extends SelectMenuInteraction {
    protected __reply?: __InternalReplyFunction | undefined;
    roles: GuildRoleStructure[];
    members: InteractionGuildMemberStructure[];
    users: UserStructure[];
    channel: AllChannels;
    constructor(client: UsingClient, interaction: APIMessageComponentSelectMenuInteraction, __reply?: __InternalReplyFunction | undefined);
    isMentionableSelectMenu(): this is MentionableSelectMenuInteraction;
}
export declare class RoleSelectMenuInteraction extends SelectMenuInteraction {
    protected __reply?: __InternalReplyFunction | undefined;
    roles: GuildRoleStructure[];
    channel: AllChannels;
    constructor(client: UsingClient, interaction: APIMessageComponentSelectMenuInteraction, __reply?: __InternalReplyFunction | undefined);
    isRoleSelectMenu(): this is RoleSelectMenuInteraction;
}
export declare class UserSelectMenuInteraction extends SelectMenuInteraction {
    protected __reply?: __InternalReplyFunction | undefined;
    members: InteractionGuildMemberStructure[];
    users: UserStructure[];
    channel: AllChannels;
    constructor(client: UsingClient, interaction: APIMessageComponentSelectMenuInteraction, __reply?: __InternalReplyFunction | undefined);
    isUserSelectMenu(): this is UserSelectMenuInteraction;
}
export declare class ChatInputCommandInteraction<FromGuild extends boolean = boolean> extends ApplicationCommandInteraction<FromGuild, APIChatInputApplicationCommandInteraction> {
    data: ObjectToLower<APIChatInputApplicationCommandInteractionData>;
    channel: AllChannels;
    isChatInput(): this is ChatInputCommandInteraction;
}
export declare class UserCommandInteraction<FromGuild extends boolean = boolean> extends ApplicationCommandInteraction<FromGuild, APIUserApplicationCommandInteraction> {
    type: ApplicationCommandType.User;
    data: ObjectToLower<APIUserApplicationCommandInteractionData>;
    channel: AllChannels;
    isUser(): this is UserCommandInteraction;
}
export declare class MessageCommandInteraction<FromGuild extends boolean = boolean> extends ApplicationCommandInteraction<FromGuild, APIMessageApplicationCommandInteraction> {
    type: ApplicationCommandType.Message;
    data: ObjectToLower<APIMessageApplicationCommandInteractionData>;
    channel: AllChannels;
    isMessage(): this is MessageCommandInteraction;
}
export interface ModalSubmitInteraction<FromGuild extends boolean = boolean> extends Omit<Interaction<FromGuild, APIModalSubmitInteraction>, 'modal'> {
}
export declare class ModalSubmitInteraction<FromGuild extends boolean = boolean> extends BaseInteraction<FromGuild> {
    data: ObjectToLower<APIModalSubmission>;
    channel: AllChannels;
    update<WR extends boolean = false>(data: ComponentInteractionMessageUpdate, withResponse?: WR): Promise<When<WR, WebhookMessageStructure, undefined>>;
    deferUpdate<WR extends boolean = false>(withResponse?: WR): Promise<When<WR, WebhookMessageStructure, undefined>>;
    get customId(): string;
    get components(): {
        components: {
            type: ComponentType;
            customId: string;
            value: string;
        }[];
        type: ComponentType.ActionRow;
    }[];
    getInputValue(customId: string, required: true): string;
    getInputValue(customId: string, required?: false): string | undefined;
    isModal(): this is ModalSubmitInteraction;
}
export {};
