import { jsx } from "react/jsx-runtime";
import { createContext, useContext } from "react";
import { useRequest } from "../../api-client/index.mjs";
const CurrentAppInfoContext = /*#__PURE__*/ createContext(null);
CurrentAppInfoContext.displayName = 'CurrentAppInfoContext';
const useCurrentAppInfo = ()=>useContext(CurrentAppInfoContext);
const CurrentAppInfoProvider = (props)=>{
    const result = useRequest({
        url: 'app:getInfo'
    });
    if (result.loading) return;
    return /*#__PURE__*/ jsx(CurrentAppInfoContext.Provider, {
        value: result.data,
        children: props.children
    });
};
export { CurrentAppInfoContext, CurrentAppInfoProvider, useCurrentAppInfo };
