import I from"./TopCard.17037962789739.js";import k from"./DeviceList.17037962789732.js";import b from"./OrgList.17037962789732.js";import{a as c}from"./comm.1703796278973.js";import{i as n}from"./utils.1703796278973.js";import{d as x,k as p,o as l,x as V,b as S,u as o,M as D,c as v,B as K}from"./vue.1703796278973.js";import{_ as w}from"./_plugin-vue_export-helper.1703796278973.js";import"./TopCard.vue_vue_type_style_index_0_scoped_817d9095_lang.1703796278973.js";import"./index.17037962789732.js";import"./index.17037962789733.js";import"./dayjs.min.1703796278973.js";import"./isArray.1703796278973.js";import"./editor.api.1703796278973.js";import"./preload-helper.1703796278973.js";import"./monaco.contribution.1703796278973.js";import"./index.170379627897320.js";import"./index.1703796278973300.js";import"./index.170379627897315.js";import"./index.170379627897317.js";import"./index.1703796278973301.js";import"./index.1703796278973302.js";import"./index.170379627897332.js";import"./index.1703796278973303.js";import"./index.170379627897339.js";import"./index.170379627897316.js";import"./index.170379627897314.js";import"./index.1703796278973304.js";import"./index.1703796278973305.js";import"./index.1703796278973306.js";import"./index.170379627897313.js";import"./index.170379627897335.js";import"./index.vue_vue_type_script_setup_true_lang.17037962789733.js";import"./index.170379627897333.js";import"./index.170379627897319.js";import"./index.170379627897327.js";import"./index.170379627897318.js";import"./index.170379627897321.js";import"./index.170379627897322.js";import"./index.170379627897323.js";import"./index.170379627897324.js";import"./index.170379627897325.js";import"./index.170379627897326.js";import"./index.170379627897328.js";import"./Item.1703796278973.js";import"./instance.1703796278973.js";import"./system.1703796278973.js";import"./index.170379627897334.js";import"./default.1703796278973.js";import"./permission.1703796278973.js";import"./consts.1703796278973.js";import"./404.1703796278973.js";import"./util.17037962789732.js";import"./department.1703796278973.js";import"./moment.1703796278973.js";const B={class:"device-select"},C=x({__name:"DeviceSelect",props:{productId:{type:String,default:""},selector:{type:String,default:""},selectorValues:{type:Array,default:()=>[]},deviceKeys:{type:Array,default:()=>[]},orgId:{type:Array,default:()=>[]}},emits:["update:selector","update:selectorValues","update:deviceKeys","update:orgId"],setup(i,{emit:t}){const a=i,r=p(a.selector),s=p(a.deviceKeys),m=p(a.orgId),d=p([{label:"自定义",value:"fixed",tip:"自定义选择当前产品下的任意设备",img:c("/scene/device-custom.png")},{label:"全部",value:"all",tip:"产品下的所有设备",img:c("/scene/trigger-device-all.png")}]);n&&d.value.push({label:"按组织",value:"org",tip:"选择产品下归属于具体组织的设备",img:c("/scene/trigger-device-org.png")});const g=e=>{r.value=e,s.value=[],m.value=[],t("update:selector",e),t("update:selectorValues",[]),t("update:deviceKeys",[]),t("update:orgId",[])},y=e=>{s.value=e,t("update:deviceKeys",e),t("update:selectorValues",e)},f=e=>{m.value=e,t("update:orgId",e),t("update:selectorValues",e)};return(e,u)=>(l(),V("div",B,[S(I,{options:o(d),value:o(r),"onUpdate:value":u[0]||(u[0]=_=>D(r)?r.value=_:null),onSelect:g},null,8,["options","value"]),o(r)==="fixed"?(l(),v(k,{key:0,productId:i.productId,"row-keys":o(s),onUpdate:y},null,8,["productId","row-keys"])):o(r)==="org"&&o(n)?(l(),v(b,{key:1,productId:i.productId,"row-keys":o(m),onUpdate:f},null,8,["productId","row-keys"])):K("",!0)]))}});const Ae=w(C,[["__scopeId","data-v-20385bbd"]]);export{Ae as default};