import { Fragment, jsx } from "react/jsx-runtime";
import { memo, useEffect } from "react";
import { App } from "antd";
import { useAPIClient } from "../../api-client/index.mjs";
import { useApp } from "../../application/index.mjs";
const AppInner = /*#__PURE__*/ memo((param)=>{
    let { children } = param;
    const app = useApp();
    const { notification } = App.useApp();
    const apiClient = useAPIClient();
    useEffect(()=>{
        apiClient.notification = notification;
        app.notification = notification;
    }, [
        notification
    ]);
    return /*#__PURE__*/ jsx(Fragment, {
        children: children
    });
});
AppInner.displayName = 'AppInner';
const AntdAppProvider = (param)=>{
    let { children } = param;
    return /*#__PURE__*/ jsx(App, {
        style: {
            height: '100%'
        },
        children: /*#__PURE__*/ jsx(AppInner, {
            children: children
        })
    });
};
AntdAppProvider.displayName = 'AntdAppProvider';
const theme_AntdAppProvider = AntdAppProvider;
export { theme_AntdAppProvider as default };
