"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = PHXFuncGetLoggedInfo;
const tslib_1 = require("tslib");
const getCookieSession_1 = tslib_1.__importDefault(require("./getCookieSession"));
function PHXFuncGetLoggedInfo() {
    const cookieSession = (0, getCookieSession_1.default)();
    const userInfo = cookieSession === null || cookieSession === void 0 ? void 0 : cookieSession.user_info;
    if (!userInfo)
        return null;
    const listRolesOfUser = (userInfo === null || userInfo === void 0 ? void 0 : userInfo.user_roles) || [];
    const isMasterRole = listRolesOfUser.some((roleItem) => roleItem.role.is_master_role);
    return { ...userInfo, isMasterRole };
}
//# sourceMappingURL=getLoginInfo.js.map