import { L as LegacyActivityMiddleware, a as LegacyAttachmentMiddleware, b as LegacyRenderAttachment, P as Polymiddleware } from './_dtsroll-chunks/qsx2_JN4-botframework-webchat-api-middleware.js';
export { c as ActivityComponentFactory } from './_dtsroll-chunks/qsx2_JN4-botframework-webchat-api-middleware.js';
import { a as SendStatus, c as ComponentFactory, b as StrictStyleOptions, C as ComponentMiddleware, f as AttachmentForScreenReaderMiddleware, g as CardActionMiddleware, A as AttachmentForScreenReaderComponentFactory, d as CallFunction, P as PerformCardAction, e as ScrollToEndButtonComponentFactory, N as Notification, R as RenderToast, F as FunctionMiddleware, h as ScrollToEndButtonMiddleware, S as StyleOptions, T as ToastMiddleware, i as TypingIndicatorMiddleware } from './hook-BtdFvwCn.js';
export { k as ActivityStatusRenderer, D as DebouncedNotification, l as DebouncedNotifications, m as PostActivityFile, o as RenderTypingIndicator, n as Typing, j as hooks } from './hook-BtdFvwCn.js';
import { WebChatActivity, OneOrMany, DirectLineJSBotConnection, Observable, sendFiles, sendMessage, setSendBoxAttachments, GlobalScopePonyfill } from 'botframework-webchat-core';
import PropTypes from 'prop-types';
import * as react from 'react';
import react__default, { ReactElement, ReactNode, Context } from 'react';
import * as react_chain_of_responsibility from 'react-chain-of-responsibility';
import { E as Enhancer$1 } from './_dtsroll-chunks/Dtb0H_Ee-handler-chain.js';
import { I as InferMiddleware, a as InferProps, b as InferRequest } from './templateMiddleware-BEttHPJk.js';
import 'valibot';
import 'react-chain-of-responsibility/preview';
import './_dtsroll-chunks/CEcj2Npa-botframework-webchat-redux-store.js';

declare const DEFAULT_OPTIONS: Required<StyleOptions>;

declare const template$1: {
    createMiddleware: (enhancer: Enhancer$1<false | react.ComponentType<{
        className?: string | undefined;
    }>, void>) => react_chain_of_responsibility.ComponentMiddleware<void, {
        className?: string | undefined;
    }, string>;
    extractMiddleware: (middleware: readonly ((init: string) => false | Enhancer$1<false | react.ComponentType<unknown>, unknown>)[] | undefined) => readonly react_chain_of_responsibility.ComponentMiddleware<void, {
        className?: string | undefined;
    }, string>[];
    Provider: react.NamedExoticComponent<{
        readonly children?: react.ReactNode | undefined;
        readonly middleware: readonly react_chain_of_responsibility.ComponentMiddleware<void, {
            className?: string | undefined;
        }, string>[];
    }>;
    Proxy: react.ComponentType<{
        className?: string | undefined;
    } & {
        readonly fallbackComponent?: react.ComponentType<{
            className?: string | undefined;
        }>;
        readonly request: void;
    }>;
    '~types': {
        middleware: react_chain_of_responsibility.ComponentMiddleware<void, {
            className?: string | undefined;
        }, string>;
        props: {
            className?: string | undefined;
        };
        request: void;
    };
};
declare const extractSendBoxMiddleware: (middleware: readonly ((init: string) => false | Enhancer$1<false | react.ComponentType<unknown>, unknown>)[] | undefined) => readonly react_chain_of_responsibility.ComponentMiddleware<void, {
    className?: string | undefined;
}, string>[];
declare const SendBoxMiddlewareProxy: react.ComponentType<{
    className?: string | undefined;
} & {
    readonly fallbackComponent?: react.ComponentType<{
        className?: string | undefined;
    }>;
    readonly request: void;
}>;
type SendBoxMiddleware = InferMiddleware<typeof template$1>;
type SendBoxMiddlewareProps = InferProps<typeof template$1>;
type SendBoxMiddlewareRequest = InferRequest<typeof template$1>;

declare const template: {
    createMiddleware: (enhancer: Enhancer$1<false | react.ComponentType<{
        className?: string | undefined;
    }>, void>) => react_chain_of_responsibility.ComponentMiddleware<void, {
        className?: string | undefined;
    }, string>;
    extractMiddleware: (middleware: readonly ((init: string) => false | Enhancer$1<false | react.ComponentType<unknown>, unknown>)[] | undefined) => readonly react_chain_of_responsibility.ComponentMiddleware<void, {
        className?: string | undefined;
    }, string>[];
    Provider: react.NamedExoticComponent<{
        readonly children?: react.ReactNode | undefined;
        readonly middleware: readonly react_chain_of_responsibility.ComponentMiddleware<void, {
            className?: string | undefined;
        }, string>[];
    }>;
    Proxy: react.ComponentType<{
        className?: string | undefined;
    } & {
        readonly fallbackComponent?: react.ComponentType<{
            className?: string | undefined;
        }>;
        readonly request: void;
    }>;
    '~types': {
        middleware: react_chain_of_responsibility.ComponentMiddleware<void, {
            className?: string | undefined;
        }, string>;
        props: {
            className?: string | undefined;
        };
        request: void;
    };
};
declare const extractSendBoxToolbarMiddleware: (middleware: readonly ((init: string) => false | Enhancer$1<false | react.ComponentType<unknown>, unknown>)[] | undefined) => readonly react_chain_of_responsibility.ComponentMiddleware<void, {
    className?: string | undefined;
}, string>[];
declare const SendBoxToolbarMiddlewareProxy: react.ComponentType<{
    className?: string | undefined;
} & {
    readonly fallbackComponent?: react.ComponentType<{
        className?: string | undefined;
    }>;
    readonly request: void;
}>;
type SendBoxToolbarMiddleware = InferMiddleware<typeof template>;
type SendBoxToolbarMiddlewareProps = InferProps<typeof template>;
type SendBoxToolbarMiddlewareRequest = InferRequest<typeof template>;

type RenderActivityStatusOptions = {
    activity: WebChatActivity;
    hideTimestamp: boolean;
    sendState: SendStatus;
};
type RenderActivityStatus = (options: RenderActivityStatusOptions) => ReactElement;
type ActivityStatusEnhancer = (next: RenderActivityStatus) => RenderActivityStatus;
type ActivityStatusMiddleware = () => ActivityStatusEnhancer;

type AvatarComponentFactoryArguments = [
    {
        activity: WebChatActivity;
        fromUser: boolean;
        styleOptions: StrictStyleOptions;
    }
];
type AvatarComponentFactory = ComponentFactory<AvatarComponentFactoryArguments, {}>;
type AvatarMiddleware = ComponentMiddleware<[], AvatarComponentFactoryArguments, {}>;

type ContextOf<T> = T extends Context<infer P> ? P : never;

type GroupedActivities = readonly (readonly WebChatActivity[])[];
type GroupActivities = CallFunction<[
    Readonly<{
        activities: readonly WebChatActivity[];
    }>
], {
    [key: string]: GroupedActivities;
}>;
type GroupActivitiesMiddleware = FunctionMiddleware<[
    string
], [
    Readonly<{
        activities: readonly WebChatActivity[];
    }>
], {
    [key: string]: GroupedActivities;
}>;

type LocalizedStrings = {
    [stringId: string]: boolean | string;
};

type BaseTelemetryMeasurementEvent = {
    dimension?: any;
};
type TelemetryEventMeasurementEvent = BaseTelemetryMeasurementEvent & {
    type: 'event';
    name: string;
    level: 'debug' | 'info' | 'warn' | 'error';
    data?: number | string | {
        [key: string]: number | string;
    };
};
type TelemetryExceptionMeasurementEvent = BaseTelemetryMeasurementEvent & {
    type: 'exception';
    error: Error;
    fatal: boolean;
};
type TelemetryTimingStartMeasurementEvent = BaseTelemetryMeasurementEvent & {
    type: 'timingstart';
    name: string;
    timingId: string;
};
type TelemetryTimingEndMeasurementEvent = BaseTelemetryMeasurementEvent & {
    type: 'timingend';
    name: string;
    timingId: string;
    duration: number;
};
type TelemetryMeasurementEvent = TelemetryEventMeasurementEvent | TelemetryExceptionMeasurementEvent | TelemetryTimingStartMeasurementEvent | TelemetryTimingEndMeasurementEvent;

type PrecompiledGlobalize = {
    dateFormatter: ({ skeleton }: {
        skeleton: 'MMMMdhm';
    }) => string;
    relativeTimeFormatter: (format: 'hour' | 'minute') => string;
    unitFormatter: ((unit: 'byte', options: {
        form: 'long';
    }) => string) | ((unit: 'kilobyte' | 'megabyte' | 'gigabyte', options: {
        form: 'short';
    }) => string);
};

type WebChatAPIContextType = {
    activityStatusRenderer: RenderActivityStatus;
    attachmentForScreenReaderRenderer?: AttachmentForScreenReaderComponentFactory;
    attachmentRenderer?: LegacyRenderAttachment;
    avatarRenderer: AvatarComponentFactory;
    clearSuggestedActions?: () => void;
    dir?: string;
    directLine?: DirectLineJSBotConnection;
    dismissNotification?: (id: string) => void;
    downscaleImageToDataURL?: (blob: Blob, maxWidth: number, maxHeight: number, type: string, quality: number) => Promise<URL>;
    emitTypingIndicator?: () => void;
    grammars?: any;
    groupActivities?: GroupActivities;
    language?: string;
    localizedGlobalizeState?: PrecompiledGlobalize[];
    localizedStrings?: {
        [language: string]: LocalizedStrings;
    };
    markActivity?: (activity: {
        id: string;
    }, name: string, value?: any) => void;
    onCardAction?: PerformCardAction;
    onTelemetry?: (event: TelemetryMeasurementEvent) => void;
    postActivity?: (activity: WebChatActivity) => Observable<string>;
    renderMarkdown?: (markdown: string, newLineOptions: {
        markdownRespectCRLF: boolean;
    }, linkOptions: {
        externalLinkAlt: string;
    }) => string;
    scrollToEndButtonRenderer?: ScrollToEndButtonComponentFactory;
    selectVoice?: (voices: (typeof window.SpeechSynthesisVoice)[], activity: WebChatActivity) => typeof window.SpeechSynthesisVoice;
    sendEvent?: (name: string, value: any) => void;
    sendFiles?: (...args: Parameters<typeof sendFiles>) => void;
    sendMessage?: (...args: Parameters<typeof sendMessage>) => void;
    sendMessageBack?: (value: any, text?: string, displayText?: string) => void;
    sendPostBack?: (value?: any) => void;
    sendTypingIndicator?: boolean;
    setDictateInterims?: (interims: string[]) => void;
    setDictateState?: (dictateState: number) => void;
    setNotification?: (notification: Notification) => void;
    setSendBox?: (value: string) => void;
    setSendBoxAttachments?: (...args: Parameters<typeof setSendBoxAttachments>) => void;
    setSendTimeout?: (timeout: number) => void;
    startDictate?: () => void;
    startSpeakingActivity?: () => void;
    stopDictate?: () => void;
    stopSpeakingActivity?: () => void;
    styleOptions?: StrictStyleOptions;
    submitSendBox?: (method?: string, { channelData }?: {
        channelData: any;
    }) => void;
    telemetryDimensionsRef?: React.Ref<any>;
    toastRenderer?: RenderToast;
    trackDimension?: (name: string, data: any) => void;
    typingIndicatorRenderer?: any;
    uiState: 'blueprint' | 'disabled' | undefined;
    userID?: string;
    username?: string;
};

type ComposerCoreProps = Readonly<{
    /**
     * @deprecated The `activityMiddleware` prop is being deprecated, please use `polymiddleware` instead. This prop will be removed on or after 2027-08-21.
     */
    activityMiddleware?: OneOrMany<LegacyActivityMiddleware>;
    activityStatusMiddleware?: OneOrMany<ActivityStatusMiddleware>;
    attachmentForScreenReaderMiddleware?: OneOrMany<AttachmentForScreenReaderMiddleware>;
    attachmentMiddleware?: OneOrMany<LegacyAttachmentMiddleware>;
    avatarMiddleware?: OneOrMany<AvatarMiddleware>;
    cardActionMiddleware?: OneOrMany<CardActionMiddleware>;
    children?: ReactNode | ((context: ContextOf<react__default.Context<WebChatAPIContextType>>) => ReactNode);
    dir?: string;
    directLine: DirectLineJSBotConnection;
    /**
     * @deprecated Please use `uiState="disabled"` instead. This feature will be removed on or after 2026-09-04.
     */
    disabled?: boolean;
    downscaleImageToDataURL?: (blob: Blob, maxWidth: number, maxHeight: number, type: string, quality: number) => Promise<URL>;
    grammars?: any;
    groupActivitiesMiddleware?: OneOrMany<GroupActivitiesMiddleware>;
    locale?: string;
    polymiddleware?: readonly Polymiddleware[];
    onTelemetry?: (event: TelemetryMeasurementEvent) => void;
    overrideLocalizedStrings?: LocalizedStrings | ((strings: LocalizedStrings, language: string) => LocalizedStrings);
    renderMarkdown?: (markdown: string, newLineOptions: {
        markdownRespectCRLF: boolean;
    }, linkOptions: {
        externalLinkAlt: string;
    }) => string;
    scrollToEndButtonMiddleware?: OneOrMany<ScrollToEndButtonMiddleware>;
    selectVoice?: (voices: (typeof window.SpeechSynthesisVoice)[], activity: WebChatActivity) => void;
    sendBoxMiddleware?: readonly SendBoxMiddleware[] | undefined;
    sendBoxToolbarMiddleware?: readonly SendBoxToolbarMiddleware[] | undefined;
    sendTypingIndicator?: boolean;
    styleOptions?: StyleOptions;
    toastMiddleware?: OneOrMany<ToastMiddleware>;
    typingIndicatorMiddleware?: OneOrMany<TypingIndicatorMiddleware>;
    /**
     * Sets the state of the UI.
     *
     * - `undefined` will render normally
     * - `"blueprint"` will render as few UI elements as possible and should be non-functional
     *   - Useful for loading scenarios
     * - `"disabled"` will render most UI elements as non-functional
     *   - Scrolling may continue to trigger read acknowledgements
     */
    uiState?: 'blueprint' | 'disabled' | undefined;
    userID?: string;
    username?: string;
}>;
type ComposerWithStoreProps = ComposerCoreProps & Readonly<{
    store?: any;
}>;
type ComposerProps = ComposerWithStoreProps & {
    internalRenderErrorBox?: any;
    /**
     * Ponyfill to overrides specific global scope members. This prop cannot be changed after initial render.
     *
     * This option is for development use only. Not all features in Web Chat are ponyfilled.
     *
     * To fake timers, `setTimeout` and related functions can be passed to overrides the original global scope members.
     *
     * Please see [#4662](https://github.com/microsoft/BotFramework-WebChat/pull/4662) for details.
     */
    ponyfill?: Partial<GlobalScopePonyfill>;
};
declare const Composer: {
    ({ internalRenderErrorBox, onTelemetry, ponyfill, ...props }: ComposerProps): any;
    defaultProps: {
        internalRenderErrorBox: any;
        onTelemetry: any;
        ponyfill: any;
        store: any;
    };
    propTypes: {
        internalRenderErrorBox: PropTypes.Requireable<any>;
        onTelemetry: PropTypes.Requireable<(...args: any[]) => any>;
        ponyfill: PropTypes.Requireable<any>;
        store: PropTypes.Requireable<any>;
    };
};

type Work<T> = (...args: unknown[]) => T;
type Enhancer<T> = (next: Work<T>) => Work<T>;
type Middleware<Setup, Result> = (setup: Setup) => Enhancer<Result>;
declare function concatMiddleware<Setup, Result>(...middleware: Middleware<Setup, Result>[]): Middleware<Setup, Result>;

declare function localize(id: string, language: string, ...args: string[]): string | boolean;

declare function normalizeStyleOptions({ hideScrollToEndButton, newMessagesButtonFontSize, ...options }?: StyleOptions): StrictStyleOptions;

type WebSpeechPonyfill = {
    /**
     * Function to resume `AudioContext` object when called.
     *
     * Web Chat will call this function on user gestures to resume suspended `AudioContext`.
     */
    resumeAudioContext?: () => Promise<void>;
    /** Polyfill for Web Speech API `SpeechGrammarList` class. */
    SpeechGrammarList?: typeof SpeechGrammarList;
    /** Polyfill for Web Speech API `SpeechRecognition` class. */
    SpeechRecognition?: typeof SpeechRecognition;
    /** Polyfill for Web Speech API `speechSynthesis` instance. */
    speechSynthesis?: SpeechSynthesis;
    /** Polyfill for Web Speech API `SpeechSynthesisUtterance` class. */
    SpeechSynthesisUtterance?: typeof SpeechSynthesisUtterance;
};

type WebSpeechPonyfillFactory = ({ referenceGrammarID }: {
    referenceGrammarID?: string;
}) => WebSpeechPonyfill;

declare const buildInfoObject: {
    readonly buildTool?: string | undefined;
    readonly moduleFormat?: string | undefined;
    readonly version?: string | undefined;
};
declare const version: string;

export { LegacyActivityMiddleware as ActivityMiddleware, type ActivityStatusMiddleware, AttachmentForScreenReaderComponentFactory, AttachmentForScreenReaderMiddleware, LegacyAttachmentMiddleware as AttachmentMiddleware, type AvatarComponentFactory, type AvatarMiddleware, CardActionMiddleware, Composer, type ComposerProps, type ContextOf, type GroupActivities, type GroupActivitiesMiddleware, Notification, PerformCardAction, type RenderActivityStatus, LegacyRenderAttachment as RenderAttachment, RenderToast, ScrollToEndButtonComponentFactory, ScrollToEndButtonMiddleware, type SendBoxMiddleware, type SendBoxMiddlewareProps, SendBoxMiddlewareProxy, type SendBoxMiddlewareRequest, type SendBoxToolbarMiddleware, type SendBoxToolbarMiddlewareProps, SendBoxToolbarMiddlewareProxy, type SendBoxToolbarMiddlewareRequest, SendStatus, StrictStyleOptions, StyleOptions, ToastMiddleware, TypingIndicatorMiddleware, type WebSpeechPonyfill, type WebSpeechPonyfillFactory, buildInfoObject as buildInfo, concatMiddleware, DEFAULT_OPTIONS as defaultStyleOptions, extractSendBoxMiddleware, extractSendBoxToolbarMiddleware, localize, normalizeStyleOptions, version };
