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