import { BaseComponent, type BaseComponentData, type CanSpoiler, type HasDescription, type HasUrl, type PartList } from './base.js'; import type { FlattenableArray } from '../utils/normalize.js'; import { ComponentType, type APIMediaGalleryComponent, type APIMediaGalleryItem } from 'discord-api-types/v10'; interface GalleryItemData { url: string; description?: string; spoiler?: boolean; } declare class MediaGalleryComponentItem implements CanSpoiler, HasDescription, HasUrl { private data; constructor(data: GalleryItemData); get Url(): string; get Description(): string | undefined; get IsSpoiler(): boolean | undefined; /** * Sets the gallery item URL. * * The value can be either: * - A url to image resource * - An attachment URL in the format `attachment://` * * @example * mediaGalleryItem.file('attachment://my_image.png') * * @param url The url of the gallery item. */ url(url: string): this; description(description: string): this; spoiler(spoiler?: boolean): this; /** * Clones the current gallery item */ clone(): MediaGalleryComponentItem; /** * Makes the Discord API Payload from galleryItem */ toJSON(): APIMediaGalleryItem; } interface MediaGalleryData extends BaseComponentData { items: MediaGalleryComponentItem[]; } declare class MediaGalleryComponent extends BaseComponent implements PartList { constructor(data: MediaGalleryData); get Type(): ComponentType.MediaGallery; /** * The gallery items in the media display */ get GalleryItems(): readonly MediaGalleryComponentItem[]; first(): MediaGalleryComponentItem | undefined; last(): MediaGalleryComponentItem | undefined; at(index: number): MediaGalleryComponentItem | undefined; push(...parts: FlattenableArray): this; shift(): MediaGalleryComponentItem | undefined; unshift(...parts: FlattenableArray): this; pop(): MediaGalleryComponentItem | undefined; insert(index: number, ...parts: FlattenableArray): this; remove(...parts: MediaGalleryComponentItem[]): this; removeAt(index: number, count?: number): MediaGalleryComponentItem[]; splice(index: number, count: number, ...parts: FlattenableArray): MediaGalleryComponentItem[]; items(...items: FlattenableArray): this; clone(): this; toJSON(): APIMediaGalleryComponent; } /** * Create MediaGalleryComponentItem * The value can be either: * - A url to image resource * - An attachment URL in the format `attachment://` * * @example * mediaGalleryItem.file('attachment://my_image.png') * * @param url The url of the gallery item. */ export declare function galleryItem(url: string): MediaGalleryComponentItem; /** * Creates a MediaGalleryComponent * @param items The gallery items you to add */ export declare function mediaGallery(...items: FlattenableArray): MediaGalleryComponent; export type { MediaGalleryComponentItem, MediaGalleryComponent }; //# sourceMappingURL=mediaGallery.d.ts.map