1"use strict";(self.webpackChunkcps_web_ui=self.webpackChunkcps_web_ui||[]).push([[4446],{64446:(e,a,s)=>{s.r(a),s.d(a,{default:()=>D});var i=s(67557),n=s(89526),t=s(64403),d=s.n(t),l=s(829),o=s(66400),r=s(304);const c="AmendLoginDetailsPage-module_mobile-cLlkS";var u,m=s(95862),g=s(76605),p=s(58357),h=s(93785),f=s(39557),v=o.ue.Drawer,w=o.ue.Button,x=o.cp.BodyDefault,j=o.cp.H3,A=o._G.BTN_TYPE;!function(e){e.PASSWORD="PASSWORD",e.EMAIL="EMAIL"}(u||(u={}));const D=function(){var e,a,s,t,o;(0,r.Tt4)(g.cd.loginDetails);var D=(0,r.hUm)(),P=D.isMobile,T=D.isTablet,b=D.deviceType,L=(0,m.ec)().eventEmitter,_=(0,r.KlO)().sendNotification;(0,n.useEffect)((function(){L.emit("open-login-details")}),[L]);var C=(0,l.a)(h.wR),S=C.data,I=C.loading,N=C.error,k=(0,n.useState)(null),E=k[0],O=k[1],y=function(){O(null),(0,r.k3Y)(),window.top.redirectFunc=void 0},R=E===u.EMAIL;return(0,i.jsxs)("div",{"data-test-id":"amend-login-wrapper",children:[(0,i.jsx)(f.mr,{title:"Login details",dataTestId:"amend-login",breadCrumbs:g.SX}),(0,i.jsxs)(r.fzO,{loading:I,className:d()("AmendLoginDetailsPage-module_contentWrapper-JR2el",(e={},e[c]=P,e["AmendLoginDetailsPage-module_tablet-eFbMc"]=T,e)),children:[N&&(0,i.jsx)("div",{"data-test-id":"amend-login-error",children:N}),S&&(0,i.jsxs)("div",{className:"AmendLoginDetailsPage-module_content-dYDKA",children:[(0,i.jsxs)("div",{className:"AmendLoginDetailsPage-module_customerInfo-wVY6T",children:[(0,i.jsx)(j,{dataTestId:"customer-name",children:"".concat(null===(s=S.user)||void 0===s?void 0:s.firstName," ").concat(null===(t=S.user)||void 0===t?void 0:t.lastName)}),(0,i.jsx)(x,{color:"text-subdued",dataTestId:"customer-email",children:null===(o=S.user)||void 0===o?void 0:o.email})]}),!P&&(0,i.jsx)(r.izJ,{}),(0,i.jsx)("div",{className:"AmendLoginDetailsPage-module_buttonsWrapper-cnUXm",children:(0,i.jsx)(w,{deviceType:b,type:P?A.SECONDARY:A.GHOST,onClick:function(){O(u.PASSWORD),window.top.redirectFunc=function(e){"success"===e&&_("",{text:"Password updated successfully"}),y()}},dataTestId:"change-password",children:"Change password"})})]})]}),(0,i.jsxs)(v,{isOpen:Boolean(E),onClose:y,deviceType:b,dataTestId:R?"change-email-modal":"change-password-modal",children:[(0,i.jsx)(v.Header,{title:R?"Change email":"Change password"}),(0,i.jsx)("iframe",{className:d()("AmendLoginDetailsPage-module_iframeWrapper-iPjkr",(a={},a[c]=P,a)),"data-test-id":"oauth-iframe",title:"Login Iframe",src:R?p.e.getEmailChangeFormUrl():p.e.getPasswordChangeFormUrl()})]})]})}}}]);
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.