import{aE as $,aF as I}from"./index.17037962789732.js";import"./index.1703796278973310.js";import{_ as S}from"./index.vue_vue_type_script_setup_true_name_PermissionButton_lang.1703796278973.js";import{u as b}from"./instance.17037962789732.js";import{_ as g}from"./Save.vue_vue_type_script_setup_true_lang.17037962789735.js";import{d as N,k as _,w as h,r as m,o as p,x as f,b as a,a as t,t as u,F as w,h as A,u as v,c as k,A as y,B as D}from"./vue.1703796278973.js";const F={style:{"margin-top":"20px"}},z=N({__name:"index",setup(T){const r=b(),d=_([]),i=_(!1);h(()=>{var e;const n=((e=r.current)==null?void 0:e.tags)||[];d.value=n});const x=()=>{i.value=!1,r.current.id&&r.refresh(r.current.id)},B=n=>{var c;let e;if(n.dataType){const o=(c=n.dataType.elements)==null?void 0:c.find(l=>l.value===n.value);e=o==null?void 0:o.text}return e};return(n,e)=>{const c=m("AIcon"),o=S,l=m("Ellipsis"),C=$,E=I;return p(),f("div",F,[a(E,{bordered:""},{title:t(()=>[u(" 标签 "),a(o,{type:"link",onClick:e[0]||(e[0]=s=>i.value=!0),hasPermission:"device/Instance:update"},{default:t(()=>[a(c,{type:"EditOutlined"}),u("编辑 ")]),_:1})]),default:t(()=>[(p(!0),f(w,null,A(v(d),s=>(p(),k(C,{span:1,key:s.key},{label:t(()=>[a(l,null,{default:t(()=>[u(y(`${s.name}（${s.key})`),1)]),_:2},1024)]),default:t(()=>[a(l,null,{default:t(()=>[u(y(B(s)),1)]),_:2},1024)]),_:2},1024))),128))]),_:1}),v(i)?(p(),k(g,{key:0,onClose:e[1]||(e[1]=s=>i.value=!1),onSave:x})):D("",!0)])}}});export{z as _};
