"use strict";(("undefined"!==typeof self?self:this)["webpackChunkEditEntity"]=("undefined"!==typeof self?self:this)["webpackChunkEditEntity"]||[]).push([[983],{983:function(e,t,i){i.r(t),i.d(t,{default:function(){return r}});var l=function(){var e=this,t=e._self._c;return t("div",[t("ValidationProvider",{attrs:{name:e.fullname,rules:e.getRules()},scopedSlots:e._u([{key:"default",fn:function(i){return[t("b-form-group",{attrs:{label:e.field.label}},["options_select"==e.field.type?t("b-form-select",{attrs:{options:e.options_allowed_values,state:e.getValidationState(i),name:e.fullname},on:{change:e.input},model:{value:e.selected,callback:function(t){e.selected=t},expression:"selected"}}):t("b-form-radio-group",{attrs:{options:e.options_allowed_values,name:e.fullname,state:e.getValidationState(i)},on:{change:e.input},model:{value:e.selected,callback:function(t){e.selected=t},expression:"selected"}})],1)]}}])})],1)},s=[],n=(i(3518),i(7458)),a={name:"OptionsAllowedValues",components:{},props:{field:{type:Object,required:!0},model:{type:[Object,Array],required:!0},namespaceStore:{type:String,required:!0},fullname:{type:String,required:!0}},data(){return{options:[],selected:null}},computed:{options_allowed_values(){const e=[];if(this.field.definition_settings.allowed_values)for(const t in this.field.definition_settings.allowed_values)e.push({value:t,text:this.field.definition_settings.allowed_values[t]});return e},is_target_type(){return!!this.field.definition_settings.target_type},is_multiple(){return 1!==this.field.cardinality}},mounted(){this.selected=this.getValue()},methods:{getFistVocab(){if(this.field.definition_settings.handler_settings.target_bundles){const e=Object.keys(this.field.definition_settings.handler_settings.target_bundles);return this.field.definition_settings.handler_settings.target_bundles[e[0]]}return null},input(e){const t=[];this.is_target_type?t.push({target_id:e}):t.push({value:e}),this.$emit("setValue",t)},getValue(){return this.model[this.field.name]&&this.model[this.field.name][0]?this.is_target_type?this.model[this.field.name][0].target_id:this.model[this.field.name][0].value:null},getValidationState(e){var t=!0;return!e.dirty&&!e.validated||t?null:t},getRules(){return n.A.getRules(this.field)}}},d=a,o=i(1656),u=(0,o.A)(d,l,s,!1,null,null,null),r=u.exports}}]);
//# sourceMappingURL=EditEntity.umd.min.983.js.map