import type { ComponentInteraction, ModalSubmitInteraction, StringSelectMenuInteraction } from '../structures/Interaction'; import type { ActionRow } from './ActionRow'; import type { Button } from './Button'; import type { Checkbox } from './Checkbox'; import type { CheckboxGroup } from './CheckboxGroup'; import type { Container } from './Container'; import type { File } from './File'; import type { FileUpload } from './FileUpload'; import type { Label } from './Label'; import type { MediaGallery } from './MediaGallery'; import type { TextInput } from './Modal'; import type { RadioGroup } from './RadioGroup'; import type { Section } from './Section'; import type { BuilderSelectMenus } from './SelectMenu'; import type { Separator } from './Separator'; import type { TextDisplay } from './TextDisplay'; import type { Thumbnail } from './Thumbnail'; export type ComponentCallback = (interaction: T, stop: ComponentStopCallback, refresh: ComponentRefreshCallback) => any; export type ComponentOnErrorCallback = (interaction: T, error: unknown, stop: ComponentStopCallback, refresh: ComponentRefreshCallback) => any; export type ComponentFilterCallback = (interaction: T) => any; export type ComponentCollectorStopReason = 'messageDelete' | 'channelDelete' | 'guildDelete' | 'idle' | 'timeout' | (string & {}) | undefined; export type ComponentOnStopCallback = (reason: ComponentCollectorStopReason, refresh: ComponentRefreshCallback) => any; export type ComponentStopCallback = (reason: ComponentCollectorStopReason) => any; export type ComponentRefreshCallback = () => any; export type ModalSubmitCallback = (interaction: T) => any; export type ButtonLink = Omit; export type ButtonID = Omit; export type MessageBuilderComponents = Exclude; export type ModalBuilderComponents = Label | TextDisplay; export type ActionBuilderComponents = Button | BuilderSelectMenus; export type BuilderComponents = ActionRow | BuilderSelectMenus | Button | Section