import type { Formattable, TelegramInputMediaAudio, TelegramInputMediaDocument, TelegramInputMediaPhoto, TelegramInputMediaVideo } from '@puregram/api'; import type { MediaInput } from '../media-source/index.js'; type Media = MediaInput | string; interface GroupOptions { /** caption to attach to one of the items in the group */ caption?: string | Formattable; /** index of the item that gets the caption (default: 0 — telegram shows first item's caption as the album caption) */ captionIndex?: number; } /** * static factories for `sendMediaGroup`-shaped arrays. each variant takes a * list of media inputs and an optional `caption` that gets attached to a * single item — by default the first one, since telegram displays the first * item's caption as the album-level caption * * @example * ```ts * tg.api.sendMediaGroup({ * chat_id, * media: MediaGroup.photos([buf1, buf2, buf3], { caption: 'three photos' }) * }) * * // attach caption to a non-first item * tg.api.sendMediaGroup({ * chat_id, * media: MediaGroup.videos([a, b, c], { caption: 'b', captionIndex: 1 }) * }) * ``` */ export declare class MediaGroup { /** photo album */ static photos(items: readonly Media[], opts?: GroupOptions): TelegramInputMediaPhoto[]; /** video album (or photo+video mixed — passed alongside `MediaGroup.photos(...)` results) */ static videos(items: readonly Media[], opts?: GroupOptions): TelegramInputMediaVideo[]; /** document group (must be uniform — all documents) */ static documents(items: readonly Media[], opts?: GroupOptions): TelegramInputMediaDocument[]; /** audio group (must be uniform — all audio files) */ static audios(items: readonly Media[], opts?: GroupOptions): TelegramInputMediaAudio[]; } export {}; //# sourceMappingURL=media-group.d.ts.map