"use strict";const e=require("../../common/vendor.js"),o=require("../../common/libraries/apiLoading.js"),l=require("../../gen/Apis.js");if(require("../../common/libraries/request.js"),require("../../common/store/useWeAppAuthStore.js"),require("../../common/store/useWatermarkStore.js"),require("../../common/store/useWorkStore.js"),!Array){(e.resolveComponent("uni-icons")+e.resolveComponent("up-cascader")+e.resolveComponent("veiw"))()}Math||((()=>"../../uni_modules/uni-icons/components/uni-icons/uni-icons.js")+(()=>"../../node-modules/uview-plus/components/u-cascader/u-cascader.js"))();const r=e.defineComponent({__name:"hs-radio-picker-categories-tree",props:["Enums","title","pickerIndex","value","borderTop","required","disabled","tip","key","des","padding","valueModel","placeholder","titleStyle","rightStyle","defaultValue"],emits:["change","update:valueModel"],setup(r,{emit:n}){const u=r,i=e.ref(!1),a=e.ref([]),t=e.ref(""),d=e.ref([]),s=e=>{var o;null==(o=a.value)||o.map(o=>{var l;(null==o?void 0:o.id)===(null==e?void 0:e[0])&&(t.value=null==o?void 0:o.name,null==(l=null==o?void 0:o.children)||l.map(o=>{(null==o?void 0:o.id)===(null==e?void 0:e[1])&&(t.value+=`/${null==o?void 0:o.name}`)}))}),n("update:valueModel",e),n("change",e)};e.watch(()=>u.defaultValue,e=>{t.value=e});return e.onMounted(()=>{o.getApiLoading(l.Apis.Emergency.EmergencyEventCategories.SelectTree,{}).then(e=>{a.value=null==e?void 0:e.data,console.log(e)})}),(o,l)=>e.e({a:e.t((null==u?void 0:u.title)||"标题"),b:r.required},(r.required,{}),{c:e.s(u.titleStyle),d:t.value},t.value?{e:e.t(t.value)}:{f:e.t((null==u?void 0:u.placeholder)||"请选择")},{g:e.p({type:"right",color:"#333",size:"12"}),h:e.s(u.rightStyle),i:u.borderTop?"1rpx solid #eee":"",j:(null==u?void 0:u.padding)||"15rpx 0",k:e.o(e=>i.value=!0),l:e.o(s),m:e.o(e=>i.value=e),n:e.o(e=>d.value=e),o:e.p({mode:"mutil-column-auto",data:a.value,"label-key":"name","value-key":"id","children-key":"children",show:i.value,modelValue:d.value})})}}),n=e._export_sfc(r,[["__scopeId","data-v-dd52e3d5"]]);wx.createComponent(n);
