import { E as Enhancer } from './_dtsroll-chunks/Dtb0H_Ee-handler-chain.js';
import * as react from 'react';
import react__default, { ReactNode, Context, ComponentType } from 'react';
import * as react_chain_of_responsibility from 'react-chain-of-responsibility';
import { ComponentMiddleware } from 'react-chain-of-responsibility';
import { WebChatActivity } from 'botframework-webchat-core';
import { I as InferMiddleware$1 } from './templateMiddleware-BEttHPJk.js';

declare function templateDecorator<const P extends {
    children?: ReactNode | undefined;
}, const R extends {}, const Name extends string = string>(name: Name, DecoratorRequestContext: Context<{
    request: R;
}>, FinalComponent?: ComponentType<P>): {
    createMiddleware: (Component: ComponentType<P & {
        Next: ComponentType<P>;
        request: R;
    }>) => (name: Name) => ReturnType<ComponentMiddleware<undefined, P & {
        Next: ComponentType<P>;
        request: R;
    }, typeof name>> | false;
    Proxy: react__default.NamedExoticComponent<P & Readonly<{
        request: R;
    }>>;
    '~types': {
        middleware: (name: Name) => ReturnType<ComponentMiddleware<undefined, P & {
            Next: ComponentType<P>;
            request: R;
        }, typeof name>> | false;
        request: R;
        props: P;
    };
};
type InferMiddleware<T extends ReturnType<typeof templateDecorator>> = T['~types']['middleware'];

declare const template$1: {
    createMiddleware: (Component: react.ComponentType<Readonly<{
        children?: ReactNode | undefined;
        showFlair?: boolean | undefined;
        showLoader?: boolean | undefined;
    }> & {
        Next: react.ComponentType<Readonly<{
            children?: ReactNode | undefined;
            showFlair?: boolean | undefined;
            showLoader?: boolean | undefined;
        }>>;
        request: Readonly<{
            livestreamingState: "completing" | "ongoing" | "preparing" | undefined;
            from: "bot" | "channel" | `user` | undefined;
        }>;
    }>) => (name: string) => false | Enhancer<false | react.ComponentType<Readonly<{
        children?: ReactNode | undefined;
        showFlair?: boolean | undefined;
        showLoader?: boolean | undefined;
    }> & {
        Next: react.ComponentType<Readonly<{
            children?: ReactNode | undefined;
            showFlair?: boolean | undefined;
            showLoader?: boolean | undefined;
        }>>;
        request: Readonly<{
            livestreamingState: "completing" | "ongoing" | "preparing" | undefined;
            from: "bot" | "channel" | `user` | undefined;
        }>;
    }>, undefined>;
    Proxy: react.NamedExoticComponent<Readonly<{
        children?: ReactNode | undefined;
        showFlair?: boolean | undefined;
        showLoader?: boolean | undefined;
    }> & Readonly<{
        request: Readonly<{
            livestreamingState: "completing" | "ongoing" | "preparing" | undefined;
            from: "bot" | "channel" | `user` | undefined;
        }>;
    }>>;
    '~types': {
        middleware: (name: string) => false | Enhancer<false | react.ComponentType<Readonly<{
            children?: ReactNode | undefined;
            showFlair?: boolean | undefined;
            showLoader?: boolean | undefined;
        }> & {
            Next: react.ComponentType<Readonly<{
                children?: ReactNode | undefined;
                showFlair?: boolean | undefined;
                showLoader?: boolean | undefined;
            }>>;
            request: Readonly<{
                livestreamingState: "completing" | "ongoing" | "preparing" | undefined;
                from: "bot" | "channel" | `user` | undefined;
            }>;
        }>, undefined>;
        request: Readonly<{
            livestreamingState: "completing" | "ongoing" | "preparing" | undefined;
            from: "bot" | "channel" | `user` | undefined;
        }>;
        props: Readonly<{
            children?: ReactNode | undefined;
            showFlair?: boolean | undefined;
            showLoader?: boolean | undefined;
        }>;
    };
};
declare const createActivityBorderMiddleware: (Component: react.ComponentType<Readonly<{
    children?: ReactNode | undefined;
    showFlair?: boolean | undefined;
    showLoader?: boolean | undefined;
}> & {
    Next: react.ComponentType<Readonly<{
        children?: ReactNode | undefined;
        showFlair?: boolean | undefined;
        showLoader?: boolean | undefined;
    }>>;
    request: Readonly<{
        livestreamingState: "completing" | "ongoing" | "preparing" | undefined;
        from: "bot" | "channel" | `user` | undefined;
    }>;
}>) => (name: string) => false | Enhancer<false | react.ComponentType<Readonly<{
    children?: ReactNode | undefined;
    showFlair?: boolean | undefined;
    showLoader?: boolean | undefined;
}> & {
    Next: react.ComponentType<Readonly<{
        children?: ReactNode | undefined;
        showFlair?: boolean | undefined;
        showLoader?: boolean | undefined;
    }>>;
    request: Readonly<{
        livestreamingState: "completing" | "ongoing" | "preparing" | undefined;
        from: "bot" | "channel" | `user` | undefined;
    }>;
}>, undefined>;
type ActivityBorderDecoratorMiddleware = InferMiddleware<typeof template$1>;

declare const template: {
    createMiddleware: (enhancer: Enhancer<false | react.ComponentType<Readonly<{
        activities: readonly WebChatActivity[];
    }>>, Readonly<{
        /**
         * Name of the grouping from the result of `groupActivitesMiddleware()`.
         */
        groupingName: string;
    }>>) => react_chain_of_responsibility.ComponentMiddleware<Readonly<{
        /**
         * Name of the grouping from the result of `groupActivitesMiddleware()`.
         */
        groupingName: string;
    }>, Readonly<{
        activities: readonly WebChatActivity[];
    }>, string>;
    extractMiddleware: (middleware: readonly ((init: string) => false | Enhancer<false | react.ComponentType<unknown>, unknown>)[] | undefined) => readonly react_chain_of_responsibility.ComponentMiddleware<Readonly<{
        /**
         * Name of the grouping from the result of `groupActivitesMiddleware()`.
         */
        groupingName: string;
    }>, Readonly<{
        activities: readonly WebChatActivity[];
    }>, string>[];
    Provider: react.NamedExoticComponent<{
        readonly children?: react.ReactNode | undefined;
        readonly middleware: readonly react_chain_of_responsibility.ComponentMiddleware<Readonly<{
            /**
             * Name of the grouping from the result of `groupActivitesMiddleware()`.
             */
            groupingName: string;
        }>, Readonly<{
            activities: readonly WebChatActivity[];
        }>, string>[];
    }>;
    Proxy: react.ComponentType<Readonly<{
        activities: readonly WebChatActivity[];
    }> & {
        readonly fallbackComponent?: react.ComponentType<Readonly<{
            activities: readonly WebChatActivity[];
        }>>;
        readonly request: Readonly<{
            /**
             * Name of the grouping from the result of `groupActivitesMiddleware()`.
             */
            groupingName: string;
        }>;
    }>;
    '~types': {
        middleware: react_chain_of_responsibility.ComponentMiddleware<Readonly<{
            /**
             * Name of the grouping from the result of `groupActivitesMiddleware()`.
             */
            groupingName: string;
        }>, Readonly<{
            activities: readonly WebChatActivity[];
        }>, string>;
        props: Readonly<{
            activities: readonly WebChatActivity[];
        }>;
        request: Readonly<{
            /**
             * Name of the grouping from the result of `groupActivitesMiddleware()`.
             */
            groupingName: string;
        }>;
    };
};
declare const createActivityGroupingMiddleware: (enhancer: Enhancer<false | react.ComponentType<Readonly<{
    activities: readonly WebChatActivity[];
}>>, Readonly<{
    /**
     * Name of the grouping from the result of `groupActivitesMiddleware()`.
     */
    groupingName: string;
}>>) => react_chain_of_responsibility.ComponentMiddleware<Readonly<{
    /**
     * Name of the grouping from the result of `groupActivitesMiddleware()`.
     */
    groupingName: string;
}>, Readonly<{
    activities: readonly WebChatActivity[];
}>, string>;
type ActivityGroupingDecoratorMiddleware = InferMiddleware$1<typeof template>;

type DecoratorMiddleware = ActivityBorderDecoratorMiddleware | ActivityGroupingDecoratorMiddleware;

export { type DecoratorMiddleware as D, createActivityGroupingMiddleware as a, createActivityBorderMiddleware as c };
