import{_ as B}from"./index.14b5d861.js";import{J as E,w as V}from"./element-plus.ae8e286c.js";import b from"./menu.dc0c1c34.js";import h from"./preview.04dbeba9.js";import{_ as C}from"./attr-setting.vue_vue_type_script_setup_true_lang.b0dc2f1f.js";import{e as N}from"./index.74588d1a.js";import{s as P,a as k}from"./decoration.6743df96.js";import{n as F,d as I}from"./index.71fc8348.js";import{d as v,_ as J,r as d,b as _,w as S,ae as A,o as f,c as W,T as r,K as n,L as M,J as O,a as T,u as g,R as U}from"./@vue.108c970a.js";import"./@vueuse.d3d080b7.js";import"./@element-plus.d6eabd08.js";import"./lodash-es.29c53eac.js";import"./dayjs.664390f6.js";import"./axios.4ebfdb3f.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"./lodash.e92d81a1.js";import"./vue-router.ed788fee.js";import"./pinia.eff1ffd5.js";import"./vue-demi.ebc8116b.js";import"./css-color-function.dbf33394.js";import"./color.e1b5fced.js";import"./clone.0a4e8ac3.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./debug.f174a91e.js";import"./ms.a9ae1d6d.js";import"./nprogress.d7c3ab1b.js";import"./vue-clipboard3.add720e2.js";import"./clipboard.01ea18f5.js";import"./echarts.8d7a50ae.js";import"./zrender.1084fa23.js";import"./tslib.60310f1a.js";import"./highlight.js.4ebdf9a4.js";import"./@highlightjs.241b9b5d.js";import"./attr.vue_vue_type_script_setup_true_lang.5aa40f68.js";import"./index.1b85017a.js";import"./picker.82b1e776.js";import"./index.a9e38e26.js";import"./picker.f5e784c0.js";import"./index.f627c566.js";import"./index.vue_vue_type_script_setup_true_lang.4acf6c9d.js";import"./index.116944b2.js";import"./index.vue_vue_type_script_setup_true_lang.f36e8ca0.js";import"./usePaging.2a59f422.js";import"./vue3-video-play.5aacf00d.js";import"./vuedraggable.38d35928.js";import"./vue.c38777e7.js";import"./sortablejs.8626b931.js";import"./content.vue_vue_type_script_setup_true_lang.4cd06df2.js";import"./decoration-img.10be6c53.js";import"./attr.vue_vue_type_script_setup_true_lang.be7616b1.js";import"./content.d4d699a8.js";import"./attr.vue_vue_type_script_setup_true_lang.59e4c343.js";import"./add-nav.vue_vue_type_script_setup_true_lang.40537f04.js";import"./content.b1d55bfb.js";import"./attr.vue_vue_type_script_setup_true_lang.8080865e.js";import"./content.vue_vue_type_script_setup_true_lang.f7d738f8.js";import"./attr.vue_vue_type_script_setup_true_lang.5c3426f9.js";import"./content.a6978f22.js";import"./attr.vue_vue_type_script_setup_true_lang.688b76f6.js";import"./content.0162afcd.js";import"./attr.vue_vue_type_script_setup_true_lang.43bd42f9.js";import"./content.vue_vue_type_script_setup_true_lang.45f9dfc9.js";import"./attr.vue_vue_type_script_setup_true_lang.6ea07177.js";import"./content.13d090b2.js";const K={class:"decoration-pages min-w-[1100px]"},L={class:"flex h-full items-start"},R=U("\u4FDD\u5B58"),$=v({name:"decorationPages"}),j=v({...$,setup(q){const m=t=>t.map(e=>{var p;return{id:F(),...((p=N[e])==null?void 0:p.options())||{}}}),a=J({[1]:{id:1,type:1,name:"\u9996\u9875\u88C5\u4FEE",pageData:m(["search","banner","nav","news"])},[2]:{id:2,type:2,name:"\u4E2A\u4EBA\u4E2D\u5FC3",pageData:m(["user-info","my-service","user-banner"])},[3]:{id:3,type:3,name:"\u5BA2\u670D\u8BBE\u7F6E",pageData:m(["customer-service"])}}),o=d("1"),i=d(-1),l=_(()=>{var t,e;return(e=(t=a[o.value])==null?void 0:t.pageData)!=null?e:[]}),D=_(()=>{var t,e;return(e=(t=a[o.value])==null?void 0:t.pageData[i.value])!=null?e:""}),u=async()=>{const t=await k({id:o.value});a[String(t.id)].pageData=JSON.parse(t.data)},x=async()=>{await P({...a[o.value],data:JSON.stringify(a[o.value].pageData)}),u()};return S(o,()=>{i.value=l.value.findIndex(t=>!t.disabled),u()},{immediate:!0}),(t,e)=>{const c=E,p=V,w=B,y=A("perms");return f(),W("div",K,[r(c,{shadow:"never",class:"!border-none flex-1 flex","body-style":{flex:1}},{default:n(()=>[T("div",L,[r(b,{modelValue:o.value,"onUpdate:modelValue":e[0]||(e[0]=s=>o.value=s),menus:a},null,8,["modelValue","menus"]),r(h,{modelValue:i.value,"onUpdate:modelValue":e[1]||(e[1]=s=>i.value=s),pageData:g(l)},null,8,["modelValue","pageData"]),r(C,{class:"flex-1",widget:g(D)},null,8,["widget"])])]),_:1}),M((f(),O(w,{class:"mt-4",fixed:!1},{default:n(()=>[r(p,{type:"primary",onClick:x},{default:n(()=>[R]),_:1})]),_:1})),[[y,["decorate:pages:save"]]])])}}});const le=I(j,[["__scopeId","data-v-c84d2462"]]);export{le as default};