import{_ as V}from"./index.19b93800.js";import{J as b,w as C}from"./element-plus.ff90c99c.js";import P from"./menu.451774ae.js";import N from"./preview.9fbc7213.js";import{_ as S}from"./attr-setting.vue_vue_type_script_setup_true_lang.2be23df6.js";import{w as h}from"./index.fe047766.js";import{s as I,a as k}from"./decoration.8b083170.js";import{t as F,d as R}from"./index.9acc1fa4.js";import{d as x,$ as U,r as f,b as g,w as A,aq as J,o as v,c as M,W as i,Q as l,a as O,u as m,j as D,R as W,P as $,U as j}from"./@vue.f8dfc830.js";import"./lodash-es.a73406b7.js";import"./@vueuse.a2e59ee9.js";import"./@element-plus.0374639c.js";import"./@popperjs.36402333.js";import"./@ctrl.b082b0c1.js";import"./dayjs.7f1be2bc.js";import"./@amap.8a62addd.js";import"./async-validator.fb49d0f5.js";import"./memoize-one.4ee5c96d.js";import"./escape-html.e5dfadb9.js";import"./normalize-wheel-es.8aeb3683.js";import"./@floating-ui.34a21088.js";import"./lodash.ffb5376d.js";import"./axios.f9df025a.js";import"./vue-router.6d4cf914.js";import"./pinia.4b196199.js";import"./vue-demi.b3a9cad9.js";import"./css-color-function.d1ea016b.js";import"./color.992612d2.js";import"./clone.d8d3ae9a.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./debug.4e7fd6e6.js";import"./ms.a9ae1d6d.js";import"./nprogress.f73355d0.js";import"./vue-clipboard3.dca5bca3.js";import"./clipboard.16e4491b.js";import"./echarts.ac57a99a.js";import"./zrender.d54ce080.js";import"./tslib.60310f1a.js";import"./highlight.js.dba6fa1b.js";import"./@highlightjs.79024f1a.js";import"./attr.vue_vue_type_script_setup_true_lang.e1e5c765.js";import"./index.e0d88e08.js";import"./picker.8cbf1f35.js";import"./index.6e7b2ec9.js";import"./index.vue_vue_type_style_index_0_scoped_95d1884e_lang.af59f801.js";import"./picker.1bc0823e.js";import"./index.b65d81e7.js";import"./index.vue_vue_type_script_setup_true_lang.44dbc460.js";import"./index.bd85115c.js";import"./index.vue_vue_type_script_setup_true_lang.ec118b31.js";import"./usePaging.bd7a7dec.js";import"./vue3-video-play.5592bdaa.js";import"./vuedraggable.8d059d95.js";import"./vue.962dd91f.js";import"./sortablejs.263ac6c9.js";import"./content.vue_vue_type_script_setup_true_lang.9866a31a.js";import"./decoration-img.99fa4b4a.js";import"./attr.vue_vue_type_script_setup_true_lang.848e1c3e.js";import"./content.a5b43de3.js";import"./attr.vue_vue_type_script_setup_true_lang.f8cb5364.js";import"./add-nav.vue_vue_type_script_setup_true_lang.771618ff.js";import"./content.1bf0d325.js";import"./attr.vue_vue_type_script_setup_true_lang.c08afbcf.js";import"./content.vue_vue_type_script_setup_true_lang.80a4d0ec.js";import"./attr.vue_vue_type_script_setup_true_lang.b806e4c7.js";import"./content.fee68604.js";import"./attr.vue_vue_type_script_setup_true_lang.153369b3.js";import"./content.7645e1df.js";import"./attr.vue_vue_type_script_setup_true_lang.e55f89b3.js";import"./content.vue_vue_type_script_setup_true_lang.b24b61a7.js";import"./attr.vue_vue_type_script_setup_true_lang.645b3e63.js";import"./content.04835794.js";const q={class:"decoration-pages min-w-[1100px]"},H={class:"flex h-full items-start"},Q=x({name:"decorationPages"}),z=x({...Q,setup(G){let u;(t=>{t.HOME="1",t.USER="2",t.SERVICE="3"})(u||(u={}));const s=t=>t.map(e=>{var p;return{id:F(),...((p=h[e])==null?void 0:p.options())||{}}}),a=U({[1]:{id:1,type:1,name:"\u9996\u9875\u88C5\u4FEE",pageData:s(["search","banner","nav","news"])},[2]:{id:2,type:2,name:"\u4E2A\u4EBA\u4E2D\u5FC3",pageData:s(["user-info","my-service","user-banner"])},[3]:{id:3,type:3,name:"\u5BA2\u670D\u8BBE\u7F6E",pageData:s(["customer-service"])}}),o=f("1"),r=f(-1),c=g(()=>{var t,e;return(e=(t=a[o.value])==null?void 0:t.pageData)!=null?e:[]}),w=g(()=>{var t,e;return(e=(t=a[o.value])==null?void 0:t.pageData[r.value])!=null?e:""}),d=async()=>{const t=await k({id:o.value});a[String(t.id)].pageData=JSON.parse(t.data)},E=async()=>{await I({...a[o.value],data:JSON.stringify(a[o.value].pageData)}),d()};return A(o,()=>{r.value=c.value.findIndex(t=>!t.disabled),d()},{immediate:!0}),(t,e)=>{const _=b,p=C,y=V,B=J("perms");return v(),M("div",q,[i(_,{shadow:"never",class:"!border-none flex-1 flex","body-style":{flex:1}},{default:l(()=>[O("div",H,[i(P,{modelValue:m(o),"onUpdate:modelValue":e[0]||(e[0]=n=>D(o)?o.value=n:null),menus:m(a)},null,8,["modelValue","menus"]),i(N,{modelValue:m(r),"onUpdate:modelValue":e[1]||(e[1]=n=>D(r)?r.value=n:null),pageData:m(c)},null,8,["modelValue","pageData"]),i(S,{class:"flex-1",widget:m(w)},null,8,["widget"])])]),_:1}),W((v(),$(y,{class:"mt-4",fixed:!1},{default:l(()=>[i(p,{type:"primary",onClick:E},{default:l(()=>[j("\u4FDD\u5B58")]),_:1})]),_:1})),[[B,["decorate:pages:save"]]])])}}});const fe=R(z,[["__scopeId","data-v-c84d2462"]]);export{fe as default};