import{d as C,a as N,r as f,s as T,M as B,f as D,x as P,y as U,w as n,i as l,h as e,t as _,j as s,I as p,aa as m,A as v,l as b,k as y,L as I,dd as O,de as R,_ as z}from"./index-N7CMQwFv.js";import{V as A}from"./VTable-JZ8Hgj7V.js";const M={class:"notification-text2"},j={class:"notification-text2-span"},E={class:"notification-tbody"},L={class:"d-flex flex-wrap mt-5 gap-5"},W={class:"btn-cancel"},$={class:"btn-save"},q=C({__name:"notifications",props:["activeTab"],setup(g){const k=g,w=N(),i=f(!1),d=f(!1),u=f(!1),r=f(!1),c=f(!1),x=async()=>{R().then(a=>{i.value=a.data.orderNotPaid,d.value=a.data.packageDelivery,u.value=a.data.walletBalance,r.value=a.data.automaticPayment,c.value=a.data.newOrder}).catch(a=>{})},V=T(),S=()=>{const a={orderNotPaid:i.value,packageDelivery:d.value,walletBalance:u.value,automaticPayment:r.value,newOrder:c.value};O(a).then(t=>{V.changeSnackbar({color:"#7367f0",location:"top",variant:"elevated",text:"Set Successful !",visible:!0})}).catch(t=>{})};B(()=>k.activeTab,a=>{a==3&&x()},{immediate:!0});const h=async()=>{await x(),V.changeSnackbar({color:"#7367f0",location:"top",variant:"elevated",text:"Reset Successful !",visible:!0})};return(a,t)=>(D(),P(U,{class:"notification-box pa-0"},{default:n(()=>[l(p,{class:"pa-5"},{default:n(()=>[t[6]||(t[6]=e("div",{class:"text-title mb-7"}," Notifications ",-1)),t[7]||(t[7]=e("div",{class:"notification-text"}," The system will send a selected notification email to your mailbox. If you do not see the email, please check whether it is classified as spam ",-1)),e("div",M,[t[5]||(t[5]=e("span",null,"System sender: [email protected] | Receiver: ",-1)),e("span",j,_(s(w).$state.userConfigInfo.email),1)])]),_:1,__:[6,7]}),l(p,{class:"pa-0"},{default:n(()=>[l(A,null,{default:n(()=>[t[13]||(t[13]=e("thead",{class:"notification-thead text-capitalize"},[e("tr",null,[e("th",{class:"notification-thead-85 text-capitalize"}," Type "),e("th",{class:"text-capitalize"},"Email")])],-1)),e("tbody",E,[e("tr",null,[t[8]||(t[8]=e("th",null,"Order not paid (more than 24 hours)",-1)),e("th",null,[l(m,{modelValue:s(i),"onUpdate:modelValue":t[0]||(t[0]=o=>v(i)?i.value=o:null)},null,8,["modelValue"])])]),e("tr",null,[t[9]||(t[9]=e("th",null,"Package delivery reminder",-1)),e("th",null,[l(m,{modelValue:s(d),"onUpdate:modelValue":t[1]||(t[1]=o=>v(d)?d.value=o:null)},null,8,["modelValue"])])]),e("tr",null,[t[10]||(t[10]=e("th",null,"Wallet balance reminder",-1)),e("th",null,[l(m,{modelValue:s(u),"onUpdate:modelValue":t[2]||(t[2]=o=>v(u)?u.value=o:null)},null,8,["modelValue"])])]),e("tr",null,[t[11]||(t[11]=e("th",null,"Automatic payment reminders",-1)),e("th",null,[l(m,{modelValue:s(r),"onUpdate:modelValue":t[3]||(t[3]=o=>v(r)?r.value=o:null)},null,8,["modelValue"])])]),e("tr",null,[t[12]||(t[12]=e("th",null,"New order reminder",-1)),e("th",null,[l(m,{modelValue:s(c),"onUpdate:modelValue":t[4]||(t[4]=o=>v(c)?c.value=o:null)},null,8,["modelValue"])])])])]),_:1,__:[13]})]),_:1}),l(p,{class:"pa-5"},{default:n(()=>[e("div",L,[e("div",W,[l(b,{variant:"outlined",color:"#6D788D",height:"42px",onClick:h},{default:n(()=>t[14]||(t[14]=[y(" Reset ")])),_:1,__:[14]})]),e("div",$,[l(b,{class:"text-none text-subtitle-1",color:"#000000",height:"42px",variant:"flat",onClick:I(S,["stop"])},{default:n(()=>t[15]||(t[15]=[y(" Save ")])),_:1,__:[15]})])])]),_:1})]),_:1}))}}),H=z(q,[["__scopeId","data-v-e7b8b338"]]);export{H as default};