"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.useLogic = void 0;
const react_1 = require("react");
const PageContext_1 = require("../../PageContext");
const usePageTitle_1 = require("../hooks/usePageTitle");
const useLogic = ({ shouldUpdateDocumentTitle, title, actions, htmlTitle, }) => {
    //Переопределение Html title на title из параметров
    (0, usePageTitle_1.usePageTitle)({ shouldUpdateDocumentTitle, htmlTitle, title });
    const { mobileTitleActions, isLoading } = (0, react_1.useContext)(PageContext_1.PageContext);
    const isShowMobileActions = actions && !mobileTitleActions;
    return {
        isShowMobileActions,
        isLoading,
        mobileTitleActions,
    };
};
exports.useLogic = useLogic;
