PageSourceSearch

https://citydrinks.com/assets/ModalChangeNotifications-2f33661a.js

js citydrinks.com collected 2026-10-04 22:51:34 UTC 4,923 bytes, 2 lines download raw bytes

1import{K as I,j as e,N as O,r as i}from"./vendor-d8e6286f.js";import{ax as $,A as n,dv as s,dw as B,Q as H,ap as K,I as k}from"./index-f807d609.js";import{u as Q}from"./DebounceHook-7f37d973.js";const G="_switch_item__container_qajs4_1",J="_switch_item__title_qajs4_4",U="_switch_item__description_qajs4_12",X="_switch_item__switch_container_qajs4_16",Y="_switch_item__switch_container__label_qajs4_22",o={switch_item__container:G,switch_item__title:J,switch_item__description:U,switch_item__switch_container:X,switch_item__switch_container__label:Y},p=({inEnabledPush:a,isEnabledEmail:r,title:c,description:_,flagNamePush:N,flagNameEmail:m,onPressSwitch:d})=>{const{t:l}=I();return e.jsxs("div",{className:o.switch_item__container,children:[e.jsxs("div",{children:[e.jsx("div",{className:o.switch_item__title,children:c}),e.jsx("div",{className:o.switch_item__description,children:_})]}),e.jsx("label",{className:"control__switch checkbox-wrapper",children:e.jsxs("div",{className:o.switch_item__switch_container,children:[e.jsx("input",{checked:a,onChange:d(N),type:"checkbox",className:"control__switch-input",name:"lang"}),e.jsx("span",{className:"control__switch-mark"}),e.jsx("div",{className:o.switch_item__switch_container__label,children:l("pushNotifications")})]})}),e.jsx("label",{className:"control__switch checkbox-wrapper",children:e.jsxs("div",{className:o.switch_item__switch_container,children:[e.jsx("input",{checked:r,onChange:d(m),type:"checkbox",className:"control__switch-input",name:"lang"}),e.jsx("span",{className:"control__switch-mark"}),e.jsx("div",{className:o.switch_item__switch_container__label,children:l("emailNotifications")})]})})]})},Z=()=>{var f,x,g,j,L,P,R,C;const{t:a}=I(),{updateDeviceAndSendTags:r}=B(),c=Q($.nameVal,600),[_,N]=i.useState(((f=n.personalData.subscriptionFlags[s.NEWS])==null?void 0:f.enabled)||!1),[m,d]=i.useState(((x=n.personalData.subscriptionFlags[s.SPECIAL_DEALS])==null?void 0:x.enabled)||!1),[l,v]=i.useState(((g=n.personalData.subscriptionFlags[s.RECOMMENDATIONS])==null?void 0:g.enabled)||!1),[u,F]=i.useState(((j=n.personalData.subscriptionFlags[s.REMINDERS])==null?void 0:j.enabled)||!1),[S,T]=i.useState(((L=n.personalData.subscriptionFlags[s.NEWS_EMAIL])==null?void 0:L.enabled)||!1),[b,y]=i.useState(((P=n.personalData.subscriptionFlags[s.SPECIAL_DEALS_EMAIL])==null?void 0:P.enabled)||!1),[w,W]=i.useState(((R=n.personalData.subscriptionFlags[s.RECOMMENDATIONS_EMAIL])==null?void 0:R.enabled)||!1),[M,q]=i.useState(((C=n.personalData.subscriptionFlags[s.REMINDERS_EMAIL])==null?void 0:C.enabled)||!1),z=i.useMemo(()=>[{name:s.NEWS,enabled:_},{name:s.REMINDERS,enabled:u},{name:s.RECOMMENDATIONS,enabled:l},{name:s.SPECIAL_DEALS,enabled:m},{name:s.NEWS_EMAIL,enabled:S},{name:s.SPECIAL_DEALS_EMAIL,enabled:b},{name:s.RECOMMENDATIONS_EMAIL,enabled:w},{name:s.REMINDERS_EMAIL,enabled:M}],[_,m,l,u,M,w,S,b]),V=(E,A)=>{const t=z.map(D=>D.name===A?{...D,enabled:E}:D);r(c,n.email,t)},h=E=>A=>{const t=A.target.checked;switch(V(t,E),E){case s.NEWS:{N(t);break}case s.RECOMMENDATIONS:{v(t);break}case s.SPECIAL_DEALS:{d(t);break}case s.REMINDERS:{F(t);break}case s.NEWS_EMAIL:{T(t);break}case s.RECOMMENDATIONS_EMAIL:{W(t);break}case s.SPECIAL_DEALS_EMAIL:{y(t);break}case s.REMINDERS_EMAIL:q(t)}};return e.jsxs(e.Fragment,{children:[e.jsx(p,{title:a("personalisedOffers"),description:a("personalisedOffersDescription"),isEnabledEmail:S,inEnabledPush:_,flagNameEmail:s.NEWS_EMAIL,flagNamePush:s.NEWS,onPressSwitch:h}),e.jsx(p,{title:a("disountAndSpecialOffers"),description:a("disountAndSpecialOffersDescription"),isEnabledEmail:b,inEnabledPush:m,flagNameEmail:s.SPECIAL_DEALS_EMAIL,flagNamePush:s.SPECIAL_DEALS,onPressSwitch:h}),e.jsx(p,{title:a("thirdPartyPromotions"),description:a("thirdPartyPromotionsDescription"),isEnabledEmail:w,inEnabledPush:l,flagNameEmail:s.RECOMMENDATIONS_EMAIL,flagNamePush:s.RECOMMENDATIONS,onPressSwitch:h}),e.jsx(p,{title:a("Transactional messages"),description:a("transactionalMessagesDescription"),isEnabledEmail:M,inEnabledPush:u,flagNameEmail:s.REMINDERS_EMAIL,flagNamePush:s.REMINDERS,onPressSwitch:h})]})},ss=O(Z),es=()=>{const{t:a}=I(),{closeModal:r}=H(),c=()=>r();return e.jsx(K,{isShow:!0,className:"modal-change-notifications__body",onBackdropDismiss:c,children:e.jsx("div",{className:"popover-container input-form",children:e.jsxs("div",{className:"popover",children:[e.jsxs("header",{className:"popover__header",children:[e.jsx("button",{className:"button _no-padding _no-color back-button",onClick:c,children:e.jsx(k,{type:"arrow",className:"icon__rotate-180",size:24})}),e.jsx("div",{className:"title",children:a("notificationSettings")})]}),e.jsx("button",{className:"button _no-padding _no-color input-form__close",onClick:c,children:e.jsx(k,{type:"plus",className:"icon__rotate-45",size:36})}),e.jsx(ss,{})]})})})},ns=O(es);export{ns as default};
2//# sourceMappingURL=ModalChangeNotifications-2f33661a.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.