import{y as S,_ as w}from"./js-yaml-ahJ4l1wK.js";import{g as B}from"./traffic-3Lpl9nRz.js";import{d as C,a as k,B as s,D as T,J as x,w as e,e as n,o as p,b as a,j as i,c as A,M as I,f as y,L,T as M,p as N,h as R,_ as D}from"./index-FX23dEwE.js";import{H as U}from"./request-dCC5BMJA.js";const h=l=>(N("data-v-b4beb481"),l=l(),R(),l),Y={class:"editorBox"},j=h(()=>i("p",null,"修改时间: 2024/3/20 15:20:31",-1)),E=h(()=>i("p",null,"版本号: xo842xqpx834",-1)),H=C({__name:"YAMLView",setup(l){const g=k(),V=s(!0),d=s(!1),m=s(8),u=s("");async function b(){var o;let t=await B((o=g.params)==null?void 0:o.ruleName);(t==null?void 0:t.code)===U.SUCCESS&&t.data&&(u.value=S.dump(t==null?void 0:t.data))}return T(()=>{b()}),(t,o)=>{const c=n("a-flex"),f=n("a-col"),v=n("a-button"),r=n("a-card");return p(),x(r,null,{default:e(()=>[a(c,{style:{width:"100%"}},{default:e(()=>[a(f,{span:d.value?24-m.value:24,class:"left"},{default:e(()=>[a(c,{vertical:"",align:"end"},{default:e(()=>[i("div",Y,[a(w,{modelValue:u.value,"onUpdate:modelValue":o[0]||(o[0]=_=>u.value=_),theme:"vs-dark",height:500,language:"yaml",readonly:V.value},null,8,["modelValue","readonly"])])]),_:1})]),_:1},8,["span"]),a(f,{span:d.value?m.value:0,class:"right"},{default:e(()=>[d.value?(p(),x(r,{key:0,class:"sliderBox"},{default:e(()=>[(p(),A(L,null,I(2,_=>a(r,{key:_},{default:e(()=>[j,E,a(c,{justify:"flex-end"},{default:e(()=>[a(v,{type:"text",style:{color:"#0a90d5"}},{default:e(()=>[y("查看")]),_:1}),a(v,{type:"text",style:{color:"#0a90d5"}},{default:e(()=>[y("回滚")]),_:1})]),_:1})]),_:2},1024)),64))]),_:1})):M("",!0)]),_:1},8,["span"])]),_:1})]),_:1})}}}),O=D(H,[["__scopeId","data-v-b4beb481"]]);export{O as default};
