import{b4 as _,b as s,a8 as y,a9 as M,M as T,a5 as x}from"./app-QjDgb7aF.js";import{b as N,a as g,g as V,i as n,q as A,p as k,k as r,J as i,D as u,u as e,I as D,H as w,F as U,G as $,f as j,j as c}from"./vue-Cm77DuTi.js";import"./charts-3gEHPHRq.js";import"./media-DuCIZ-3n.js";const E={class:"_monolithic_"},F={key:0,class:"_section"},I={key:1,class:"_section _formRoot"},H=N({__name:"MkNotificationSettingWindow",props:{includingTypes:{default:()=>[]},showGlobalToggle:{type:Boolean,default:!0}},emits:["done","closed"],setup(v,{emit:h}){const f=h,b=v;let p=j(()=>b.includingTypes||[]);const m=g();let o=g({}),d=g((p.value===null||p.value.length===0)&&b.showGlobalToggle);for(const l of _.notificationTypes)o.value[l]=p.value.includes(l);function B(){d.value?f("done",{includingTypes:null}):f("done",{includingTypes:Object.keys(o.value).filter(l=>o.value[l])}),m.value.close()}function S(){for(const l in o.value)o.value[l]=!1}function C(){for(const l in o.value)o.value[l]=!0}return(l,a)=>(c(),V(x,{ref_key:"dialog",ref:m,width:400,height:450,"with-ok-button":!0,"ok-button-disabled":!1,onOk:a[1]||(a[1]=t=>B()),onClose:a[2]||(a[2]=t=>m.value.close()),onClosed:a[3]||(a[3]=t=>f("closed"))},{header:n(()=>[i(u(e(s).ts.notificationSetting),1)]),default:n(()=>[A("div",E,[v.showGlobalToggle?(c(),k("div",F,[r(y,{modelValue:e(d),"onUpdate:modelValue":a[0]||(a[0]=t=>D(d)?d.value=t:d=t)},{caption:n(()=>[i(u(e(s).ts.useGlobalSettingDesc),1)]),default:n(()=>[i(u(e(s).ts.useGlobalSetting)+" ",1)]),_:1},8,["modelValue"])])):w("",!0),e(d)?w("",!0):(c(),k("div",I,[r(M,{class:"_formBlock"},{default:n(()=>[i(u(e(s).ts.notificationSettingDesc),1)]),_:1}),r(T,{inline:"",onClick:S},{default:n(()=>[i(u(e(s).ts.disableAll),1)]),_:1}),r(T,{inline:"",onClick:C},{default:n(()=>[i(u(e(s).ts.enableAll),1)]),_:1}),(c(!0),k(U,null,$(e(_.notificationTypes),t=>(c(),V(y,{class:"_formBlock",key:t,modelValue:e(o)[t],"onUpdate:modelValue":G=>e(o)[t]=G},{default:n(()=>[i(u(e(s).t(`_notification._types.${t}`)),1)]),_:2},1032,["modelValue","onUpdate:modelValue"]))),128))]))])]),_:1},512))}});export{H as default};
//# sourceMappingURL=MkNotificationSettingWindow-Dp4RCmWc.js.map
