(self.webpackChunkhws_provider_authentication=self.webpackChunkhws_provider_authentication||[]).push([[594],{898:function(e,t,n){"use strict";n.d(t,{A:function(){return A}});var r=n(8168),o=n(8587),a=n(9434),s=n(4164),i=n(5659),l=n(9262),d=n(6323),c=n(8413),u=n(1609);function m(e){return(0,u.Ay)("MuiCardContent",e)}(0,c.A)("MuiCardContent",["root"]);var f=n(8757);let h=["className","component"],x=e=>{let{classes:t}=e;return(0,i.A)({root:["root"]},m,t)},g=(0,l.Ay)("div",{name:"MuiCardContent",slot:"Root",overridesResolver:(e,t)=>t.root})(()=>({padding:16,"&:last-child":{paddingBottom:24}}));var A=a.forwardRef(function(e,t){let n=(0,d.A)({props:e,name:"MuiCardContent"}),{className:a,component:i="div"}=n,l=(0,o.A)(n,h),c=(0,r.A)({},n,{component:i}),u=x(c);return(0,f.jsx)(g,(0,r.A)({as:i,className:(0,s.A)(u.root,a),ownerState:c,ref:t},l))})},1059:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return f}});var r=n(8757),o=n(5793),a=n(898),s=n(7868),i=n(4585),l=n(9434),d=n(7921),c=function(){let[e]=(0,o.useSearchParams)(),t=e.get("token"),n=(0,d.A)();console.log("Auth hook in ResetEmailForm:",n);let[a,s]=(0,l.useState)(!1),[c,u]=(0,l.useState)(!0),m=e=>window?.HWS?.I18n?.t(e)??e;return((0,l.useEffect)(()=>{n?.resetEmail&&(async()=>{if(!t){s(!1),u(!1);return}u(!0);try{if(n?.resetEmail){let e=await n.resetEmail(t);s(!!e?.Success)}else s(!1)}catch(e){console.error("Error resetting email:",e),s(!1)}u(!1)})()},[n,t]),c)?(0,r.jsx)(i.A,{children:m("HWS_PROVIDER_AUTHENTICATION_LOADING")}):(0,r.jsx)(r.Fragment,{children:a?(0,r.jsx)(i.A,{children:m("HWS_PROVIDER_AUTHENTICATION_YOUR_EMAIL_ADDRESS_CHANGE_SUCCESSFULLY")}):(0,r.jsx)(i.A,{children:m("HWS_PROVIDER_AUTHENTICATION_CHANGING_EMAIL_ADDRESS_FAILED")})})},u=n(7006),m=n(8804),f=()=>{let e=(0,u.Z)(),t=e?.brandName,n=e?.brandLogo,l=e?.brandDescription,d=e?.brandBackground,f=e=>window?.HWS?.I18n?.t(e)??e;return(0,r.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col items-center sm:flex-row sm:justify-center md:items-start md:justify-start",children:[(0,r.jsx)(s.A,{className:"h-full w-full px-16 py-8 ltr:border-r-1 rtl:border-l-1 sm:h-auto sm:w-auto sm:rounded-2xl sm:p-48 sm:shadow md:flex md:h-full md:w-1/2 md:items-center md:justify-end md:rounded-none md:p-64 md:shadow-none",children:(0,r.jsxs)(a.A,{className:"mx-auto w-full max-w-320 sm:mx-0 sm:w-320",children:[n&&(0,r.jsx)("img",{className:"logo-icon h-32 w-32",src:n,alt:"logo"}),(0,r.jsxs)(i.A,{className:"mt-32 text-4xl font-extrabold leading-tight tracking-tight",children:[f("HWS_PROVIDER_AUTHENTICATION_EMAIL_CHANGE"),"!"]}),(0,r.jsxs)("div",{className:"mt-2 flex items-baseline font-medium",children:[(0,r.jsx)(i.A,{children:f("HWS_PROVIDER_AUTHENTICATION_BACK_TO")}),(0,r.jsx)(o.Link,{className:"ml-4",to:"/auth/sign-in",children:f("HWS_PROVIDER_AUTHENTICATION_SIGN_IN")})]}),(0,r.jsx)(c,{})]})}),(0,r.jsxs)(m.Box,{className:"relative hidden h-full flex-auto items-center justify-center overflow-hidden p-64 md:flex lg:px-112",sx:{backgroundColor:"primary.main"},style:{backgroundImage:d?`url(${d})`:"none",backgroundSize:"cover",backgroundPosition:"center",backgroundRepeat:"no-repeat",width:"100%"},children:[(0,r.jsx)(m.Box,{component:"svg",className:"absolute -right-64 -top-64 opacity-20",sx:{color:"primary.light"},viewBox:"0 0 220 192",width:"220px",height:"192px",fill:"none",children:(0,r.jsx)("rect",{width:"220",height:"192",fill:"url(#837c3e70-6c3a-44e6-8854-cc48c737b659)"})}),(0,r.jsxs)("div",{className:"relative z-10 w-full max-w-2xl",children:[t&&(0,r.jsx)("div",{className:"text-7xl font-bold leading-none text-gray-100",children:t}),l&&(0,r.jsx)("div",{className:"mt-24 text-lg leading-6 tracking-tight text-gray-400",children:l})]})]})]})}},3085:function(){},7006:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(9434);function o(){let e=window.HWS?.Branding,t=()=>{let t=e?.getBrandingData?.()??{};return{brandName:t.brandName??"",brandLogo:t.brandLogo??"",brandDescription:t.brandDescription,brandBackground:t.brandBackground}},[n,o]=(0,r.useState)(t);return(0,r.useEffect)(()=>{if(!e?.subscribe){o(t());return}let n=e.subscribe(()=>{o(t())});return o(t()),()=>{"function"==typeof n&&n()}},[e]),n}},7921:function(e,t,n){"use strict";n.d(t,{A:function(){return s}});var r=n(9434);n(3085);let o=(0,r.createContext)({loading:!0});function a(){return(0,r.useContext)(o)}function s(){let[e,t]=(0,r.useState)(()=>a);return(0,r.useEffect)(()=>{let e=()=>{let e=window?.HWS?.Hooks;if(e){let n=e.get("useAuth");if(n)return t(()=>n),!0}return!1};if(!e()){let t=()=>e();return document.addEventListener("auth-hook-ready",t),()=>document.removeEventListener("auth-hook-ready",t)}},[]),e()}}}]);