import * as __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__ from "react/jsx-runtime";
import * as __WEBPACK_EXTERNAL_MODULE_react__ from "react";
import * as __WEBPACK_EXTERNAL_MODULE__user_index_mjs__ from "../../user/index.mjs";
import * as __WEBPACK_EXTERNAL_MODULE__useTabSettings_mjs__ from "./useTabSettings.mjs";
const PageStyleContext = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react__.createContext)({
    style: 'classical'
});
const PageStyleProvider = (param)=>{
    let { children } = param;
    var _currentUser_data_data_systemSettings;
    const currentUser = (0, __WEBPACK_EXTERNAL_MODULE__user_index_mjs__.useCurrentUserContext)();
    const tabItem = (0, __WEBPACK_EXTERNAL_MODULE__useTabSettings_mjs__.useTabSettings)();
    const [items, setItems] = (0, __WEBPACK_EXTERNAL_MODULE_react__.useState)([]);
    const { addMenuItem } = (0, __WEBPACK_EXTERNAL_MODULE__user_index_mjs__.useCurrentUserSettingsMenu)();
    (0, __WEBPACK_EXTERNAL_MODULE_react__.useEffect)(()=>{
        addMenuItem(tabItem, {
            before: 'divider_3'
        });
    }, [
        addMenuItem,
        tabItem
    ]);
    return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(PageStyleContext.Provider, {
        value: {
            style: (null === (_currentUser_data_data_systemSettings = currentUser.data.data.systemSettings) || void 0 === _currentUser_data_data_systemSettings ? void 0 : _currentUser_data_data_systemSettings.pageStyle) || 'classical',
            items,
            setItems
        },
        children: children
    });
};
export { PageStyleContext, PageStyleProvider };
