import{_ as E}from"./index.6fbb13c4.js";import{I as b,w as B}from"./element-plus.9c2fdfa8.js";import P from"./menu.8d762cd5.js";import k from"./preview-pc.ba78a759.js";import{_ as C}from"./attr-setting.vue_vue_type_script_setup_true_lang.f683e781.js";import"./index.ade5f456.js";import{s as I,a as N}from"./decoration.17f04f2c.js";import"./lodash.5512e984.js";import{d as v,$ as h,r as d,e as u,w as M,af as S,o as _,c as O,U as i,L as n,M as U,K as F,a as J,u as p,k as f,R}from"./@vue.53f8d7c3.js";import{d as T}from"./index.b57b84f0.js";import"./@vueuse.038954e7.js";import"./@element-plus.37f92579.js";import"./lodash-es.29c53eac.js";import"./dayjs.e873ead7.js";import"./@amap.8a62addd.js";import"./async-validator.fb49d0f5.js";import"./@ctrl.82a509e0.js";import"./@popperjs.36402333.js";import"./escape-html.e5dfadb9.js";import"./normalize-wheel-es.8aeb3683.js";import"./axios.92474d72.js";import"./vue-router.e2f4a118.js";import"./pinia.bd103f5d.js";import"./vue-demi.ebc8116b.js";import"./css-color-function.ee641d3d.js";import"./color.cbc2f3a9.js";import"./clone.7fddbad2.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./debug.a7d78d4d.js";import"./ms.a9ae1d6d.js";import"./nprogress.f73355d0.js";import"./vue-clipboard3.dca5bca3.js";import"./clipboard.16e4491b.js";import"./echarts.8d7a50ae.js";import"./zrender.1084fa23.js";import"./tslib.60310f1a.js";import"./highlight.js.4ebdf9a4.js";import"./@highlightjs.9cf3e967.js";import"./attr.vue_vue_type_script_setup_true_lang.5dd3ab68.js";import"./index.b370dd86.js";import"./picker.2c9cd9c1.js";import"./index.3fc23cf2.js";import"./index.vue_vue_type_style_index_0_scoped_187b1ead_lang.33043b78.js";import"./picker.5ad7fc14.js";import"./index.a9321345.js";import"./index.vue_vue_type_script_setup_true_lang.261df48b.js";import"./index.06c1697f.js";import"./index.vue_vue_type_script_setup_true_lang.aa03e8e3.js";import"./usePaging.c22e2b6f.js";import"./vue3-video-play.65ddc377.js";import"./vuedraggable.c7bbafb5.js";import"./vue.a327c52f.js";import"./sortablejs.cb65aecb.js";import"./content.vue_vue_type_script_setup_true_lang.cb0ba886.js";import"./decoration-img.dcabf528.js";import"./attr.vue_vue_type_script_setup_true_lang.34f31355.js";import"./content.f1a5edad.js";import"./attr.vue_vue_type_script_setup_true_lang.89741c1d.js";import"./add-nav.vue_vue_type_script_setup_true_lang.d1d665bc.js";import"./content.3433b81b.js";import"./attr.vue_vue_type_script_setup_true_lang.4b2b04c7.js";import"./content.vue_vue_type_script_setup_true_lang.2ded593e.js";import"./attr.vue_vue_type_script_setup_true_lang.6aa74a67.js";import"./content.16ec59b4.js";import"./attr.vue_vue_type_script_setup_true_lang.6e3bb62f.js";import"./content.0959fdc9.js";import"./attr.vue_vue_type_script_setup_true_lang.7d8c1f73.js";import"./content.vue_vue_type_script_setup_true_lang.6170a32a.js";import"./attr.vue_vue_type_script_setup_true_lang.6aefd81d.js";import"./content.d94591e4.js";const W={class:"decoration-pages min-w-[1100px]"},$={class:"flex h-full items-start"},H=v({name:"decorationPc"}),K=v({...H,setup(L){let l;(t=>{t.HOME="4"})(l||(l={}));const a=h({[4]:{id:4,type:4,name:"\u9996\u9875\u88C5\u4FEE",pageData:[]}}),o=d("4"),r=d(0),m=u(()=>{var t,e;return(e=(t=a[o.value])==null?void 0:t.pageData)!=null?e:[]}),g=u(()=>{var t,e;return(e=(t=a[o.value])==null?void 0:t.pageData[r.value])!=null?e:""}),c=async()=>{const t=await N({id:o.value});a[String(t.id)].pageData=JSON.parse(t.data),r.value=m.value.findIndex(e=>!e.disabled)},x=async()=>{await I({...a[o.value],data:JSON.stringify(a[o.value].pageData)}),c()};return M(o,()=>{r.value=m.value.findIndex(t=>!t.disabled),c()},{immediate:!0}),(t,e)=>{const D=b,w=B,y=E,V=S("perms");return _(),O("div",W,[i(D,{shadow:"never",class:"!border-none flex-1 flex","body-style":{flex:1}},{default:n(()=>[J("div",$,[i(P,{modelValue:p(o),"onUpdate:modelValue":e[0]||(e[0]=s=>f(o)?o.value=s:null),menus:p(a)},null,8,["modelValue","menus"]),i(k,{class:"mx-4",modelValue:p(r),"onUpdate:modelValue":e[1]||(e[1]=s=>f(r)?r.value=s:null),pageData:p(m)},null,8,["modelValue","pageData"]),i(C,{class:"flex-1",widget:p(g),type:"pc"},null,8,["widget"])])]),_:1}),U((_(),F(y,{class:"mt-4",fixed:!1},{default:n(()=>[i(w,{type:"primary",onClick:x},{default:n(()=>[R("\u4FDD\u5B58")]),_:1})]),_:1})),[[V,["decorate:pages:save"]]])])}}});const le=T(K,[["__scopeId","data-v-0627c615"]]);export{le as default};