import { Fragment, jsx, jsxs } from "react/jsx-runtime";
import { useEffect } from "react";
import { useTranslation } from "react-i18next";
import { useCurrentAppInfo } from "../../common/appInfo/CurrentAppInfoProvider.mjs";
import { useCurrentUserSettingsMenu } from "../../user/CurrentUserSettingsMenuProvider.mjs";
const SystemVersion = ()=>{
    const info = useCurrentAppInfo();
    const { t } = useTranslation();
    return /*#__PURE__*/ jsxs("span", {
        children: [
            t('App Version'),
            " - ",
            null == info ? void 0 : info.data.version
        ]
    });
};
const SystemVersionProvider = (param)=>{
    let { children } = param;
    const { addMenuItem } = useCurrentUserSettingsMenu();
    useEffect(()=>{
        addMenuItem({
            key: 'system-version',
            label: /*#__PURE__*/ jsx(SystemVersion, {})
        }, {
            before: 'divider_1'
        });
    }, [
        addMenuItem
    ]);
    return /*#__PURE__*/ jsx(Fragment, {
        children: children
    });
};
export { SystemVersionProvider };
