import{W as d}from"./index.17037962789732.js";import"./index.170379627897337.js";import"./index.170379627897315.js";import{M as p}from"./index.1703796278973322.js";import{m as u}from"./resource.1703796278973.js";import{o as f}from"./comm.1703796278973.js";import{d as _,k as v,w as h,o as w,c as x,a as y,b as M,u as n,M as V}from"./vue.1703796278973.js";const O=_({__name:"index",props:{data:{type:Object,default:()=>{}}},emits:["close","save"],setup(l,{emit:o}){const t=l,a=v("{}");h(()=>{var e;a.value=((e=t.data)==null?void 0:e.metadata)||"{}"});const m=async()=>{(await u(t.data.id,{metadata:n(a)})).status===200&&(o("save"),f("操作成功","success"))},r=()=>{o("close")};return(e,s)=>{const c=d;return w(),x(c,{visible:"",title:"编辑",width:700,onOk:m,onCancel:r},{default:y(()=>[M(p,{style:{width:"100%",height:"370px"},theme:"vs",modelValue:n(a),"onUpdate:modelValue":s[0]||(s[0]=i=>V(a)?a.value=i:null),language:"json"},null,8,["modelValue"])]),_:1})}}});export{O as _};
