"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.UserHelpers = void 0;
var types_1 = require("@bringg/types");
var lodash_1 = require("lodash");
var UserHelpers = /** @class */ (function () {
    function UserHelpers() {
    }
    UserHelpers.isOfflineDriver = function (user) {
        return user.driver === true && user.status === types_1.Connection.Offline;
    };
    UserHelpers.isOnlineDriver = function (user) {
        return user.driver === true && user.status === types_1.Connection.Online;
    };
    UserHelpers.isOnShiftDriver = function (user) {
        return user.driver === true && !(0, lodash_1.isNil)(user.active_shift_id);
    };
    UserHelpers.isCustomer = function (user) {
        return user.customer === true;
    };
    UserHelpers.isAdmin = function (user) {
        return user.admin === true;
    };
    UserHelpers.isDispatcher = function (user) {
        return user.dispatcher === true;
    };
    UserHelpers.isDriver = function (user) {
        return user.driver === true;
    };
    return UserHelpers;
}());
exports.UserHelpers = UserHelpers;
//# sourceMappingURL=UserHelpers.js.map