import{d as r,k as i,O as v,o as g,c as k,a as _,b as I,u as s,M as b}from"./vue.1703796278973.js";import{W as h}from"./index.17037962789732.js";import"./index.170379627897337.js";import"./index.170379627897315.js";import y from"./index.1703796278973157.js";import{o as C}from"./comm.1703796278973.js";import{s as M}from"./plugin.17037962789733.js";const w=r({name:"InklingModal"}),j=r({...w,props:{accessId:{type:String,default:void 0},id:{type:String,default:void 0}},emits:["cancel","submit"],setup(o,{emit:t}){const c=o,e=i(c.id),a=i(!1),u=v(),d=async()=>{if(e.value){a.value=!0;const n=await M("device",c.accessId,u.params.id,e.value).catch(()=>({success:!1}));a.value=!1,n.success&&t("submit",e.value)}else C("请选择设备","error")},m=()=>{t("cancel")};return(n,l)=>{const f=h;return g(),k(f,{width:800,"mask-closable":!1,visible:!0,title:"设备ID映射",confirmLoading:s(a),onOk:d,onCancel:m},{default:_(()=>[I(s(y),{value:s(e),"onUpdate:value":l[0]||(l[0]=p=>b(e)?e.value=p:null),accessId:o.accessId},null,8,["value","accessId"])]),_:1},8,["confirmLoading"])}}});export{j as _};
