parcelRequire=function(e,r,t,n){var i,o="function"==typeof parcelRequire&&parcelRequire,u="function"==typeof require&&require;function f(t,n){if(!r[t]){if(!e[t]){var i="function"==typeof parcelRequire&&parcelRequire;if(!n&&i)return i(t,!0);if(o)return o(t,!0);if(u&&"string"==typeof t)return u(t);var c=new Error("Cannot find module '"+t+"'");throw c.code="MODULE_NOT_FOUND",c}p.resolve=function(r){return e[t][1][r]||r},p.cache={};var l=r[t]=new f.Module(t);e[t][0].call(l.exports,p,l,l.exports,this)}return r[t].exports;function p(e){return f(p.resolve(e))}}f.isParcelRequire=!0,f.Module=function(e){this.id=e,this.bundle=f,this.exports={}},f.modules=e,f.cache=r,f.parent=o,f.register=function(r,t){e[r]=[function(e,r){r.exports=t},{}]};for(var c=0;c<t.length;c++)try{f(t[c])}catch(e){i||(i=e)}if(t.length){var l=f(t[t.length-1]);"object"==typeof exports&&"undefined"!=typeof module?module.exports=l:"function"==typeof define&&define.amd?define(function(){return l}):n&&(this[n]=l)}if(parcelRequire=f,i)throw i;return f}({"QdEO":[function(require,module,exports) {
module.exports={props:{name:{type:String,required:!0},value:{type:null,default:null},type:{type:String,required:!0},length:{type:[String,Number],default:null},readonly:{type:Boolean,default:!1},required:{type:Boolean,default:!1},options:{type:Object,default:function(){return{}}},newItem:{type:Boolean,default:!1},relation:{type:Object,default:null},fields:{type:Object,default:null},values:{type:Object,default:null}}};
},{}],"QhH9":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=e(require("../../../mixins/interface"));function e(t){return t&&t.__esModule?t:{default:t}}function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var n={mixins:[t.default],name:"interface-user-role",data:function(){return{loading:!1,roles:[],error:null}},computed:{selectOptions:function(){var t={};return this.roles.filter(function(t){return 2!==t.id}).forEach(function(e){t[e.id]=e.name}),t},currentRole:function(){var t=this.value&&this.value[0]&&this.value[0].role;if("object"!==r(t)){var e=this.roles.filter(function(e){return e.id==t});return e&&e[0]}return t},currentRoleID:function(){return this.currentRole&&this.currentRole.id}},created:function(){this.fetchRoles()},methods:{fetchRoles:function(){var t=this;this.loading=!0,this.$api.getRoles().then(function(t){return t.data}).then(function(e){t.roles=e,t.loading=!1,t.error=null}).catch(function(e){t.loading=!1,t.error=e})},emitValue:function(t){var e=this.value&&this.value[0]&&this.value[0].id;e?this.$emit("input",[{id:e,role:t}]):this.$emit("input",[{role:t}])}}};exports.default=n;
(function(){var e=exports.default||module.exports;"function"==typeof e&&(e=e.options),Object.assign(e,{render:function(){var e=this.$createElement;return(this._self._c||e)("v-select",{attrs:{icon:"perm_identity",id:this.name,name:this.name,placeholder:this.$t("choose_one"),options:this.selectOptions,value:this.currentRoleID},on:{input:this.emitValue}})},staticRenderFns:[],_compiled:!0,_scopeId:"data-v-3e695e",functional:void 0});})();
},{"../../../mixins/interface":"QdEO"}]},{},["QhH9"], "__DirectusExtension__")