import { BaseInteractiveComponent, type BaseInteractiveComponentData, type HasDescription, type HasLabel, type PartialEmoji, type PartList, type SelectMenu } from './base.js'; import type { FlattenableArray } from '../utils/normalize.js'; import type { APIStringSelectComponent } from 'discord-api-types/v10'; import { ComponentType } from 'discord-api-types/v9'; export interface SelectOptionData { label: string; value: string; description?: string; emoji?: PartialEmoji; default?: boolean; } declare class SelectOption implements HasDescription, HasLabel { private data; constructor(data: SelectOptionData); get Label(): string; /** * The value of the select option */ get Value(): string; get Description(): string | undefined; /** * The emoji of the select option */ get Emoji(): PartialEmoji | undefined; /** * Whether the option is marked as default */ get IsDefault(): boolean | undefined; label(label: string): this; /** * Sets the label of the string option * @param value The label text of the option */ value(value: string): this; description(description: string): this; /** * Sets the label of the string option * @param emoji The label text of the option */ emoji(emoji: string | PartialEmoji): this; /** * Sets whether the component is default or not * @param state The disabled state of the option */ default(state?: boolean): this; /** * Clones the current option */ clone(): SelectOption; /** * Makes the Discord API Payload from option */ toJSON(): SelectOptionData; } export declare function option(data: SelectOptionData): SelectOption; interface StringSelectData extends BaseInteractiveComponentData { options: SelectOption[]; placeholder?: string; min_values?: number; max_values?: number; disabled?: boolean; } type StringSelectOption = SelectOption | SelectOptionData; declare class StringSelectComponent extends BaseInteractiveComponent implements SelectMenu, PartList { constructor(data: StringSelectData); get Type(): ComponentType.StringSelect; get Placeholder(): string | undefined; get MinValue(): number | undefined; get MaxValues(): number | undefined; /** * The options given in the string select menu */ get Options(): readonly SelectOption[]; placeholder(content: string): this; minValues(count?: number): this; maxValues(count?: number): this; first(): SelectOption | undefined; last(): SelectOption | undefined; at(index: number): SelectOption | undefined; push(...parts: FlattenableArray): this; shift(): SelectOption | undefined; unshift(...parts: FlattenableArray): this; pop(): SelectOption | undefined; insert(index: number, ...parts: FlattenableArray): this; remove(...parts: SelectOption[]): this; removeAt(index: number, count?: number): SelectOption[]; splice(index: number, count: number, ...parts: FlattenableArray): SelectOption[]; /** * Replaces options of the current string select menu * @param options The options of the select menu * @returns */ options(...options: FlattenableArray): this; clone(): this; toJSON(): APIStringSelectComponent; } export declare function stringSelect(...options: FlattenableArray): StringSelectComponent; export type { SelectOption, StringSelectComponent }; //# sourceMappingURL=stringSelect.d.ts.map