import { BaseComponent, type BaseComponentData, type ColorResolable, type PartList, type CanSpoiler } from './base.js'; import type { FlattenableArray } from '../utils/normalize.js'; import type { ActionRowComponent } from './actionRow.js'; import type { FileComponent } from './file.js'; import type { MediaGalleryComponent } from './mediaGallery.js'; import type { SectionComponent } from './section.js'; import type { SeparatorComponent } from './separator.js'; import type { TextDisplayComponent } from './textDisplay.js'; import { ComponentType, type APIContainerComponent } from 'discord-api-types/v10'; type ContainerChild = ActionRowComponent | SectionComponent | TextDisplayComponent | SeparatorComponent | MediaGalleryComponent | FileComponent; interface ContainerData extends BaseComponentData { accent_color?: number; spoiler?: boolean; components: ContainerChild[]; } declare class ContainerComponent extends BaseComponent implements CanSpoiler, PartList { constructor(data: ContainerData); get Type(): ComponentType.Container; /** * The components in the container */ get Components(): readonly ContainerChild[]; /** * The accent color of the container */ get AccentColor(): number | undefined; get IsSpoiler(): boolean | undefined; /** * Set the accent color of the container * @param color The color to set, must be either a hex code or a encoded number * @returns */ accent(color?: ColorResolable): this; spoiler(spoiler?: boolean): this; first(): ContainerChild | undefined; last(): ContainerChild | undefined; at(index: number): ContainerChild | undefined; push(...parts: FlattenableArray): this; shift(): ContainerChild | undefined; unshift(...parts: FlattenableArray): this; pop(): ContainerChild | undefined; insert(index: number, ...parts: FlattenableArray): this; remove(...parts: ContainerChild[]): this; removeAt(index: number, count?: number): ContainerChild[]; splice(index: number, count: number, ...parts: FlattenableArray): ContainerChild[]; /** * Replace components in the container * @param parts The new components to replace the old with */ components(...parts: FlattenableArray): this; clone(): this; toJSON(): APIContainerComponent; } /** * Creates an ContainerComponent * @param components The components to add to the container */ export declare function container(...components: FlattenableArray): ContainerComponent; export type { ContainerComponent }; //# sourceMappingURL=container.d.ts.map