import type { ComponentInteraction, ModalSubmitInteraction, StringSelectMenuInteraction, } from '../structures/Interaction'; import type { ActionRow } from './ActionRow'; import type { Button } from './Button'; import type { Container } from './Container'; import type { File } from './File'; import type { MediaGallery } from './MediaGallery'; import type { TextInput } from './Modal'; 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< T extends ComponentInteraction | StringSelectMenuInteraction = ComponentInteraction | StringSelectMenuInteraction, > = (interaction: T, stop: ComponentStopCallback, refresh: ComponentRefreshCallback) => any; export type ComponentOnErrorCallback< T extends ComponentInteraction | StringSelectMenuInteraction = ComponentInteraction | StringSelectMenuInteraction, > = (interaction: T, error: unknown, stop: ComponentStopCallback, refresh: ComponentRefreshCallback) => any; export type ComponentFilterCallback = (interaction: T) => any; export type ComponentStopCallback = ( reason: 'messageDelete' | 'channelDelete' | 'guildDelete' | 'idle' | 'timeout' | (string & {}) | undefined, refresh: ComponentRefreshCallback, ) => any; export type ComponentRefreshCallback = () => any; export type ModalSubmitCallback = (interaction: T) => any; export type ButtonLink = Omit; export type ButtonID = Omit; export type MessageBuilderComponents = FixedComponents