"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var singleton = Symbol();
var singletonEnforcer = Symbol();
var PermissionsService = /** @class */ (function () {
    function PermissionsService(enforcer) {
        this._permissions = ['read'];
        this._roles = {
            ANONYMOUS: ['read']
        };
        if (enforcer !== singletonEnforcer) {
            throw new Error('Cannot construct singleton');
        }
        this._type = 'PermissionsService';
    }
    Object.defineProperty(PermissionsService, "instance", {
        get: function () {
            if (!this[singleton]) {
                this[singleton] = new PermissionsService(singletonEnforcer);
            }
            return this[singleton];
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PermissionsService.prototype, "permissions", {
        get: function () {
            return this._permissions;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PermissionsService.prototype, "roles", {
        get: function () {
            return this._roles;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PermissionsService.prototype, "user", {
        get: function () {
            return this._user;
        },
        set: function (user) {
            this._user = user;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PermissionsService.prototype, "type", {
        get: function () {
            return this._type;
        },
        set: function (value) {
            this._type = value;
        },
        enumerable: true,
        configurable: true
    });
    return PermissionsService;
}());
exports.PermissionsService = PermissionsService;
//# sourceMappingURL=permissions-service.js.map