import{_ as B}from"./index.2a3cc40c.js";import{I as E,w as V}from"./element-plus.fa1aa32c.js";import b from"./menu.0e28128a.js";import h from"./preview.8d0188fc.js";import{_ as C}from"./attr-setting.vue_vue_type_script_setup_true_lang.4fe7412b.js";import{w as F}from"./index.6a2560b6.js";import{s as N,a as P}from"./decoration.be3abd00.js";import{o as k,f as I,d as S}from"./index.0abf9e5c.js";import{d as v,a0 as T,r as d,e as _,w as A,ag as M,o as g,c as O,V as r,M as n,a as J,u as f,O as U,L as W,T as L}from"./@vue.cab01781.js";import"./@vueuse.724ed0af.js";import"./@element-plus.92b4185f.js";import"./lodash-es.29c53eac.js";import"./dayjs.22a46fd8.js";import"./axios.8058589d.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.bbe6f09f.js";import"./vue-router.5046cc50.js";import"./pinia.e85e8286.js";import"./vue-demi.bfae2336.js";import"./css-color-function.5bd363c0.js";import"./color.232115c1.js";import"./clone.8f44c0eb.js";import"./color-convert.69e17089.js";import"./color-string.e356f5de.js";import"./color-name.e7a4e1d3.js";import"./nprogress.404eaa9c.js";import"./vue-clipboard3.19ab9072.js";import"./clipboard.6fb7c109.js";import"./echarts.6ad8c478.js";import"./zrender.f91f2f01.js";import"./highlight.js.4ebdf9a4.js";import"./@highlightjs.0ab41b7b.js";import"./attr.vue_vue_type_script_setup_true_lang.bf02be3c.js";import"./index.a5935337.js";import"./picker.a8e8312e.js";import"./index.082aefea.js";import"./picker.9777ec45.js";import"./index.a2d4596a.js";import"./usePaging.c00588f1.js";import"./index.8930a171.js";import"./index.vue_vue_type_script_setup_true_lang.2ded5aed.js";import"./vue3-video-play.05975c53.js";import"./vuedraggable.5917840d.js";import"./vue.a15b7233.js";import"./sortablejs.c69601cb.js";import"./content.vue_vue_type_script_setup_true_lang.ecbe13fb.js";import"./decoration-img.86a83dbc.js";import"./attr.vue_vue_type_script_setup_true_lang.468dcca5.js";import"./content.d9290133.js";import"./attr.vue_vue_type_script_setup_true_lang.35cd56fc.js";import"./add-nav.vue_vue_type_script_setup_true_lang.46ae1c21.js";import"./content.a65a57b9.js";import"./attr.vue_vue_type_script_setup_true_lang.5c3cb791.js";import"./content.vue_vue_type_script_setup_true_lang.6cae415d.js";import"./attr.vue_vue_type_script_setup_true_lang.06a2fa18.js";import"./content.eee78eea.js";import"./attr.vue_vue_type_script_setup_true_lang.0b87e513.js";import"./content.36207187.js";import"./attr.vue_vue_type_script_setup_true_lang.028dddc7.js";import"./content.vue_vue_type_script_setup_true_lang.c42941ea.js";import"./attr.vue_vue_type_script_setup_true_lang.0583d8bc.js";import"./content.eea90bde.js";const $={class:"decoration-pages min-w-[1100px]"},j={class:"flex h-full items-start"},q=L("\u4FDD\u5B58"),z=v({name:"decorationPages"}),G=v({...z,setup(H){const s=e=>e.map(t=>{var p;return{id:k(),...((p=F[t])==null?void 0:p.options())||{}}}),a=T({[1]:{id:1,pageType:1,name:"\u9996\u9875\u88C5\u4FEE",pageData:s(["search","banner","nav","news"])},[2]:{id:2,pageType:2,name:"\u4E2A\u4EBA\u4E2D\u5FC3",pageData:s(["user-info","my-service","user-banner"])},[3]:{id:3,pageType:3,name:"\u5BA2\u670D\u8BBE\u7F6E",pageData:s(["customer-service"])}}),o=d("1"),i=d(-1),u=_(()=>{var e,t;return(t=(e=a[o.value])==null?void 0:e.pageData)!=null?t:[]}),D=_(()=>{var e,t;return(t=(e=a[o.value])==null?void 0:e.pageData[i.value])!=null?t:""}),l=async()=>{const e=await P({id:o.value});a[String(e.id)].pageData=JSON.parse(e.pageData)},x=async()=>{await N({...a[o.value],pageData:JSON.stringify(a[o.value].pageData)}),l(),I.msgSuccess("\u4FDD\u5B58\u6210\u529F")};return A(o,()=>{i.value=u.value.findIndex(e=>!e.disabled),l()},{immediate:!0}),(e,t)=>{const c=E,p=V,w=B,y=M("perms");return g(),O("div",$,[r(c,{shadow:"never",class:"!border-none flex-1 flex","body-style":{flex:1}},{default:n(()=>[J("div",j,[r(b,{modelValue:o.value,"onUpdate:modelValue":t[0]||(t[0]=m=>o.value=m),menus:a},null,8,["modelValue","menus"]),r(h,{modelValue:i.value,"onUpdate:modelValue":t[1]||(t[1]=m=>i.value=m),pageData:f(u)},null,8,["modelValue","pageData"]),r(C,{class:"flex-1",widget:f(D)},null,8,["widget"])])]),_:1}),U((g(),W(w,{class:"mt-4",fixed:!1},{default:n(()=>[r(p,{type:"primary",onClick:x},{default:n(()=>[q]),_:1})]),_:1})),[[y,["decorate:pages:save"]]])])}}});const pt=S(G,[["__scopeId","data-v-ed050f9e"]]);export{pt as default};
