import type { ChannelNode } from "./ir.js"; import type { BotChildren } from "./components.js"; interface WithModalChildren { children?: BotChildren; } export interface ModalProps extends WithModalChildren { /** Stable id routed to `channel.onModalSubmit` / `channel.onModalClose`. */ callbackId: string; title: string; submitLabel?: string; closeLabel?: string; /** Slack: emit a `view_closed` event when the user dismisses the modal. */ notifyOnClose?: boolean; /** Opaque string echoed back to the submit/close handler. */ privateMetadata?: string; } export interface TextInputProps { id: string; label: string; placeholder?: string; multiline?: boolean; optional?: boolean; maxLength?: number; initialValue?: string; children?: never; } export interface ModalSelectProps extends WithModalChildren { id: string; label: string; placeholder?: string; optional?: boolean; /** `value` of the option selected by default. */ initialOption?: string; } export interface ModalSelectOptionProps { label: string; value: string; children?: never; } export interface RadioButtonsProps extends WithModalChildren { id: string; label: string; optional?: boolean; initialOption?: string; } /** A modal view IR root. Distinct from message IR; rendered via `renderModal`. */ export type ModalView = ChannelNode & { type: "modal"; }; /** Thrown by an adapter's `renderModal` when a view uses an unsupported element. */ export declare class ModalRenderError extends Error { constructor(message: string); } export declare const Modal: (props: ModalProps) => ModalView; export declare const TextInput: (props: TextInputProps) => ChannelNode; export declare const ModalSelect: (props: ModalSelectProps) => ChannelNode; export declare const ModalSelectOption: (props: ModalSelectOptionProps) => ChannelNode; export declare const RadioButtons: (props: RadioButtonsProps) => ChannelNode; export {}; //# sourceMappingURL=modal.d.ts.map