import{bs as e,D as l,u as a,a as s,c as t,m as o,s as u,o as n,d as c,e as d,f as i,x as m,y as p,C as r,g as b,l as _,z as f,i as v,t as w,k as g,w as y,j as h,E as k,F as V,h as j,M as x,_ as O,B as U,G as C,A as E,p as P,H as D}from"./wbs-f6dQykzJ.js";import{_ as H}from"./el-checkbox-group-Bch8jmbW.js";import{E as M,a as R,_ as T}from"./GeneralForm-CjXfP0VJ.js";import{a as F,E as G}from"./el-tab-pane-BlNWRa6C.js";import{E as L}from"./el-switch-Crq5Wtjf.js";import"./el-checkbox-Dm1dSfR0.js";import"./el-popper-DAeOyDKB.js";import"./el-radio-DbVhzpF1.js";import"./el-select-BHr6UOna.js";import"./strings-D7s33Q9h.js";const z={class:"wbs-content"},A={class:"wbs-main setting-box"},B={class:"opt-function-hd"},I={class:"func-name"},S=["innerHTML"],q={key:0,class:"mt"},J={class:"ml ib"},K={key:1,class:"mt"},N={class:"ml"},Q={class:"wbs-form-table-sub"},W={class:"row w6em"},X=e({__name:"TOC",setup(e){const X=l(),{wbsCnf:Y}=a(),{wb_e:Z}=s(Y),$=t(Y.actpanel_visible),ee=t(0),le=t(!1),ae=t(Y.is_pro),se=o({}),te=o({}),oe=t("content");function ue(e){const l={op:"toc_update",opt:se};E.saveData(l).then((l=>{D.success(Z("设置保存成功")),ee.value=0,e&&e()}))}function ne(){X.push("/pro")}return u(se,(()=>{ee.value++}),{deep:!0}),n((()=>{E.getData({op:"toc_setting"}).then((e=>{Object.assign(se,e.opt),Object.assign(te,e.cnf),P((()=>{ee.value=0})),le.value=!0}))})),(e,l)=>{const a=L,s=k,t=x,o=R,u=G,n=F,E=M,P=T,D=O,X=H,ce=C,de=c("wbs-ctrl-bar"),ie=p;return i(),d("div",z,[m((i(),d("div",{class:r(["wbs-content-inner",{"wb-page-loaded":le.value}])},[b("div",{class:r(["wbs-group",{"with-actpanel":$.value}])},[b("div",A,[b("div",B,[b("h3",I,[b("strong",null,w(te.label),1),l[7]||(l[7]=b("i",{class:"tag-pro"},"Pro",-1))]),b("div",{class:"func-desc",innerHTML:te.description},null,8,S),ae.value?(i(),d("div",q,[v(a,{modelValue:se.toc_switch,"onUpdate:modelValue":l[0]||(l[0]=e=>se.toc_switch=e),"active-value":"1","inactive-value":"0"},null,8,["modelValue"]),b("span",J,w("1"==se.toc_switch?g(Z)("功能开启"):g(Z)("功能关闭")),1)])):(i(),d("div",K,[v(s,{type:"primary",onClick:l[1]||(l[1]=e=>ne())},{default:y((()=>[h(w(g(Z)("获取PRO版本")),1)])),_:1}),b("span",N,w(g(Z)("激活PRO版本即可使用")),1)]))]),v(P,{modelValue:se,"onUpdate:modelValue":l[4]||(l[4]=e=>se=e),fields:te.fields,wb_e:g(Z)},{custom:y((({field:e})=>["style"==e.slug?(i(),_(E,{key:0,"data-slug":e.slug,label:e.label,class:"with-sub-group"},{default:y((()=>[v(n,{class:"custom-opt-pane",type:"border-card",modelValue:oe.value,"onUpdate:modelValue":l[3]||(l[3]=e=>oe.value=e)},{default:y((()=>[(i(!0),d(V,null,j(e.attrs.items,(e=>(i(),_(u,{key:e.slug,label:e.label,name:e.slug},{default:y((()=>[b("table",Q,[b("tbody",null,[(i(!0),d(V,null,j(e.fields,(a=>(i(),d("tr",{key:a.slug},[b("th",W,w(a.label),1),b("td",null,["custom_style"==a.slug?(i(),_(t,{key:0,type:"textarea",modelValue:se.custom_style,"onUpdate:modelValue":l[2]||(l[2]=e=>se.custom_style=e),field:a,wb_e:g(Z)},null,8,["modelValue","field","wb_e"])):(i(),_(o,{key:1,modelValue:se.style[e.slug][a.slug],"onUpdate:modelValue":l=>se.style[e.slug][a.slug]=l,field:a,wb_e:g(Z)},null,8,["modelValue","onUpdate:modelValue","field","wb_e"]))])])))),128))])])])),_:2},1032,["label","name"])))),128))])),_:2},1032,["modelValue"])])),_:2},1032,["data-slug","label"])):f("",!0)])),_:1},8,["modelValue","fields","wb_e"]),m(v(D,{class:"mt"},null,512),[[U,le.value]])]),$.value?m((i(),_(X,{key:0,onVisible:l[5]||(l[5]=e=>$.value=e),wb_e:g(Z)},null,8,["wb_e"])),[[U,le.value]]):f("",!0)],2),g(Y).is_pro?f("",!0):(i(),_(ce,{key:0})),ae.value?(i(),_(de,{key:1,changed:ee.value,wb_e:g(Z),onSubmit:ue},null,8,["changed","wb_e"])):(i(),_(de,{key:2},{default:y((()=>[v(s,{type:"primary",onClick:l[6]||(l[6]=e=>ne())},{default:y((()=>[h(w(g(Z)("获取PRO版本")),1)])),_:1})])),_:1}))],2)),[[ie,!le.value]])])}}},[["__scopeId","data-v-bdd3fe4e"]]);export{X as default};
