const singleton = Symbol();
const singletonEnforcer = Symbol();
export class PermissionsService {
    constructor(enforcer) {
        this._permissions = ['read'];
        this._roles = {
            ANONYMOUS: ['read']
        };
        if (enforcer !== singletonEnforcer) {
            throw new Error('Cannot construct singleton');
        }
        this._type = 'PermissionsService';
    }
    static get instance() {
        if (!this[singleton]) {
            this[singleton] = new PermissionsService(singletonEnforcer);
        }
        return this[singleton];
    }
    get permissions() {
        return this._permissions;
    }
    get roles() {
        return this._roles;
    }
    get user() {
        return this._user;
    }
    set user(user) {
        this._user = user;
    }
    get type() {
        return this._type;
    }
    set type(value) {
        this._type = value;
    }
}
//# sourceMappingURL=permissions-service.js.map