import { BaseComponent, type BaseComponentData, type PartList } from './base.js'; import type { FlattenableArray } from '../utils/normalize.js'; import type { ButtonComponent } from './button.js'; import type { TextDisplayComponent } from './textDisplay.js'; import type { ThumbnailComponent } from './thumbnail.js'; import type { APISectionComponent } from 'discord-api-types/v10'; import { ComponentType } from 'discord-api-types/v9'; type SectionAccessory = ButtonComponent | ThumbnailComponent; type SectionChild = TextDisplayComponent; interface SectionData extends BaseComponentData { accessory?: SectionAccessory; components: SectionChild[]; } declare class SectionComponent extends BaseComponent implements PartList { constructor(data: SectionData); get Type(): ComponentType.Section; /** * The components in the section */ get Components(): readonly SectionChild[]; /** * The accessory of the section */ get Accessory(): SectionAccessory | undefined; /** * Sets the accessory of the section * @param accessory The accessory to use */ accessory(accessory: SectionAccessory): this; first(): SectionChild | undefined; last(): SectionChild | undefined; at(index: number): SectionChild | undefined; push(...parts: FlattenableArray): this; shift(): SectionChild | undefined; unshift(...parts: FlattenableArray): this; pop(): SectionChild | undefined; insert(index: number, ...parts: FlattenableArray): this; remove(...parts: SectionChild[]): this; removeAt(index: number, count?: number): SectionChild[]; splice(index: number, count: number, ...parts: FlattenableArray): SectionChild[]; /** * Replace components in the section * @param parts The new components to replace the old with */ components(...parts: FlattenableArray): this; clone(): this; toJSON(): APISectionComponent; } /** * Creates an SectionComponent * @param components The components to add to the section */ export declare function section(...components: FlattenableArray): SectionComponent; export type { SectionComponent }; //# sourceMappingURL=section.d.ts.map