(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[980],{78196:function(e,s,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/profile/password-change",function(){return t(3398)}])},62464:function(e,s){"use strict";s.Z={src:"/_next/static/media/lock.e3afddfc.svg",height:20,width:20,blurWidth:0,blurHeight:0}},21104:function(e,s){"use strict";s.Z={src:"/_next/static/media/search.59a089d2.svg",height:24,width:24,blurWidth:0,blurHeight:0}},39821:function(e,s,t){"use strict";var a=t(85893),l=t(42994),i=t(96260);s.Z=e=>{let{children:s}=e;return(0,a.jsxs)(i.Z,{children:[(0,a.jsxs)("div",{className:"max-sm:hidden flex bg-white max-sm:bg-transparent mt-8 rounded-[12px] shadow-lg max-sm:shadow-none",children:[(0,a.jsx)(l.Z,{}),(0,a.jsx)("div",{className:"w-full h-100 border-l-2 max-sm:hidden",children:s})]}),(0,a.jsx)("div",{className:"hidden max-sm:flex flex-col",children:s})]})}},24394:function(e,s,t){"use strict";var a=t(85893),l=t(11163),i=t(84295),r=t(18644);s.Z=e=>{let s=(0,l.useRouter)();return(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"hidden max-sm:flex items-center justify-between",children:[(0,a.jsxs)("div",{className:"flex items-center gap-4",children:[(0,a.jsx)(i.Wuc,{onClick:()=>s.back(),color:"#1F2026"}),(0,a.jsx)("p",{className:"text-[#1F2026] bold text-[20px]",children:e.title})]}),(0,a.jsx)(r.bI9,{size:24,className:"cursor-pointer text-[#CDD0D9] hover:text-white max-sm:text-[#82848E]"})]}),(0,a.jsx)("p",{className:"max-sm:hidden text-[#1F2026] bold text-[20px]",children:e.title})]})}},42994:function(e,s,t){"use strict";t.d(s,{Z:function(){return F}});var a=t(85893),l=t(35653),i=t(87362),r=t(90512),n=t(25675),d=t.n(n),c=t(41664),x=t.n(c),o=t(11163),m={src:"/_next/static/media/call_hospital.7919c444.svg",height:18,width:18,blurWidth:0,blurHeight:0},h={src:"/_next/static/media/student card.175f42cd.svg",height:20,width:20,blurWidth:0,blurHeight:0},u={src:"/_next/static/media/student card_selected.a29f3128.svg",height:20,width:20,blurWidth:0,blurHeight:0},p={src:"/_next/static/media/shield-check.4659a9a3.svg",height:20,width:20,blurWidth:0,blurHeight:0},f={src:"/_next/static/media/shield-check_selected.da2a2fd0.svg",height:20,width:20,blurWidth:0,blurHeight:0},v=t(62464),j={src:"/_next/static/media/lock_selected.70223ac0.svg",height:20,width:20,blurWidth:0,blurHeight:0},g={src:"/_next/static/media/coin-dollar.d3248456.svg",height:20,width:20,blurWidth:0,blurHeight:0},w={src:"/_next/static/media/coin-dollar_selected.1d97cea1.svg",height:20,width:20,blurWidth:0,blurHeight:0},b=t(33299),N=t(28601),_=t(18644),F=()=>{let e=(0,o.useRouter)(),s=s=>{let t=e.pathname===s.path;return(0,a.jsxs)("div",{children:[(0,a.jsx)(x(),{href:s.path,prefetch:!1,className:"max-sm:hidden",children:(0,a.jsxs)("div",{className:(0,r.Z)((0,l.L)({className:(0,r.Z)("flex-row flex p-4 w-[280px] max-sm:min-w-full h-[60px] group rounded-none justify-start",t?"bg-[#111111]":"bg-white")})),children:[(0,a.jsx)(d(),{alt:"",src:t?s.selectedIcon:s.icon,width:32,height:32}),(0,a.jsx)("p",{className:(0,r.Z)("text-[16px]",t?"text-white":"text-[#1F2026]"),children:s.title}),(0,a.jsx)("div",{className:"h-[10px] w-full group-hover:bg-[#FF7B2E] rounded-full absolute bottom-[-5px]"})]})}),(0,a.jsxs)("div",{className:(0,r.Z)((0,l.L)({className:"hidden max-sm:flex flex-row p-4 w-[280px] max-sm:min-w-full h-[60px] group rounded-none justify-start bg-transparent border-b-2"})),onClick:()=>e.push(s.path),children:[(0,a.jsx)(d(),{alt:"",src:s.icon,width:32,height:32}),(0,a.jsx)("p",{className:(0,r.Z)("text-[16px] text-[#525359]"),children:s.title})]})]})};return(0,a.jsxs)("div",{className:"w-full max-w-[280px] max-sm:max-w-full",children:[(0,a.jsxs)("div",{className:"hidden max-sm:flex items-center justify-between px-6 mt-4",children:[(0,a.jsx)("div",{className:"flex items-center gap-4",children:(0,a.jsx)("p",{className:"text-[#1F2026] bold text-[20px]",children:"Perfil"})}),(0,a.jsx)(_.bI9,{size:24,className:"cursor-pointer text-[#CDD0D9] hover:text-white max-sm:text-[#82848E]"})]}),(0,a.jsx)("div",{className:"hidden max-sm:flex",children:(0,a.jsx)(N.Z,{})}),(0,a.jsx)("p",{className:"m-4 max-sm:mt-10 text-[#1F2026] semibold text-[20px]",children:"Configura\xe7\xf5es"}),(0,a.jsx)(s,{icon:h,path:"/profile/person-info",selectedIcon:u,title:"Informa\xe7\xf5es pessoais"}),(0,a.jsx)(s,{icon:v.Z,path:"/profile/password-change",selectedIcon:j,title:"Alterar senha"}),(0,a.jsx)(s,{icon:g,path:"/profile/financial-data",selectedIcon:w,title:"Dados financeiros"}),(0,a.jsx)(s,{icon:p,path:"/profile/security",selectedIcon:f,title:"Seguran\xe7a (2FA)"}),(0,a.jsx)(s,{icon:m,path:"/profile/help-center",selectedIcon:m,title:"Central de ajuda"}),(0,a.jsx)("div",{className:"p-4",children:(0,a.jsx)(i.A,{className:"w-full",variant:"bordered",onClick:()=>(0,b.signOut)(),children:(0,a.jsx)("p",{className:"semibold",children:"Logout"})})})]})}},28601:function(e,s,t){"use strict";var a=t(85893),l=t(26697),i=t(93093),r=t(20572),n=t(34863),d=t(87362),c=t(49559),x=t(47873),o=t(34210),m=t(21974),h=t(33299),u=t(67294),p=t(78773),f=t(55678),v=t(36207),j=t(25675),g=t.n(j),w=t(90512);s.Z=()=>{var e,s,t,j,b;let{update:N,data:_,status:F}=(0,h.useSession)(),{isPosting:Z,abstractPost:y}=(0,i.Z)(),[E,k]=(0,u.useState)(null),{isOpen:A,onOpen:C,onClose:I}=(0,r.q)();return(0,u.useEffect)(()=>{var e,s;(null==_?void 0:null===(s=_.userData)||void 0===s?void 0:null===(e=s.user_media)||void 0===e?void 0:e.profile_image_url)&&k(()=>{var e,s;return null==_?void 0:null===(s=_.userData)||void 0===s?void 0:null===(e=s.user_media)||void 0===e?void 0:e.profile_image_url})},[F]),(0,a.jsxs)("div",{className:"flex w-full gap-8 mt-4 items-center max-sm:p-4 max-sm:mt-0 max-sm:gap-2 overflow-x-hidden",children:[(0,a.jsxs)("div",{className:"relative",children:[Z&&(0,a.jsx)(n.c,{color:"white",size:"lg",className:"absolute self-center top-10 left-10"}),E?(0,a.jsx)("img",{src:E,alt:"",className:(0,w.Z)("rounded-[100%] min-w-[160px] min-h-[160px] max-w-[160px] max-h-[160px] border-[#FF7B2E] border-3","max-sm:max-w-[60px] max-sm:max-h-[60px] max-sm:min-w-[60px] max-sm:min-h-[60px]"),style:{objectFit:"cover"}}):(0,a.jsx)(p.wzp,{className:(0,w.Z)("min-w-[160px] min-h-[160px] max-w-[160px] max-h-[160px] ","max-sm:max-w-[60px] max-sm:max-h-[60px] max-sm:min-w-[60px] max-sm:min-h-[60px]")})]}),(0,a.jsxs)("div",{className:"w-full max-sm:hidden",children:[(0,a.jsx)(d.A,{className:"rounded-[32px] px-8 bg-[#393A3F] text-white semibold",onPress:C,children:"Atualizar foto de perfil"}),(0,a.jsxs)("div",{className:"mt-2",children:[(0,a.jsx)("p",{children:"Recomendado pelo menos 800x800px"}),(0,a.jsx)("p",{children:"Apenas JPG e PNG s\xe3o permitidos"})]})]}),(0,a.jsxs)("div",{className:"hidden max-sm:flex justify-between w-full",children:[(0,a.jsxs)("div",{children:[(0,a.jsxs)("p",{className:"text-[#1F2026] semibold",children:[null==_?void 0:null===(e=_.userData.user)||void 0===e?void 0:e.first_name," ",null==_?void 0:null===(s=_.userData.user)||void 0===s?void 0:s.last_name]}),(0,a.jsx)("p",{className:"text-[12px]",children:null==_?void 0:null===(t=_.userData.user)||void 0===t?void 0:t.email})]}),(0,a.jsxs)(d.A,{className:"text-[12px] max-h-[32px] max-w-[110px]",startContent:(0,a.jsx)(g(),{alt:"",src:v.Z,style:{width:"20px",height:"20px"}}),children:[null==_?void 0:null===(b=_.userData.wallet)||void 0===b?void 0:null===(j=b.wallet_address)||void 0===j?void 0:j.slice(0,8),"..."]})]}),(0,a.jsx)(c.R,{size:"2xl",isOpen:A,onClose:I,children:(0,a.jsx)(x.A,{className:"bg-white",children:e=>(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(o.k,{className:"flex flex-col gap-1",children:"Selecionar imagem"}),(0,a.jsx)(m.I,{children:(0,a.jsx)(l.xs,{onSaveImage:s=>{(function(e){if(e){let s=new FormData;s.append("file",e),y("/users/photo",s).then(e=>{200===e.status&&(_.userData.user_media.profile_image_url=e.data.profile_image_url,N(_),f.Am.success("Imagem atualizada!"))})}})(s),e()}})})]})})})]})}},3398:function(e,s,t){"use strict";t.r(s),t.d(s,{default:function(){return N}});var a=t(85893),l=t(39821),i=t(20572),r=t(87362),n=t(49559),d=t(47873),c=t(21974),x=t(87536),o=t(26697),m=t(93093),h=t(24394),u=t(62464),p=t(25675),f=t.n(p),v={src:"/_next/static/media/password_update.192080ca.svg",height:95,width:103,blurWidth:0,blurHeight:0},j=t(33299),g=t(21104),w=t(11163);let b=()=>{let{data:e}=(0,j.useSession)(),s=(0,w.useRouter)(),{control:t,formState:{errors:l},handleSubmit:p}=(0,x.cI)(),{abstractPost:b,isPosting:N}=(0,m.Z)(),{isOpen:_,onOpen:F,onClose:Z}=(0,i.q)();return(0,a.jsxs)("div",{className:"p-4 flex flex-col h-full gap-4",children:[(0,a.jsx)(h.Z,{title:"Alterar Senha"}),(null==e?void 0:e.userData.user_auth.status)==="Ativo"?(0,a.jsxs)("div",{className:"flex flex-col w-1/3 items-center self-center",children:[(0,a.jsx)(o.oH,{control:t,errors:l,name:"old_password",title:"Senha atual",className:"w-full",securityEntry:!0,customLeftElement:(0,a.jsx)(f(),{alt:"",src:u.Z,width:20}),validator:{required:"Insira sua senha atual"}}),(0,a.jsx)(o.oH,{control:t,errors:l,name:"new_password",title:"Nova senha",securityEntry:!0,className:"w-full",customLeftElement:(0,a.jsx)(f(),{alt:"",src:u.Z,width:20}),validator:{required:"Insira sua nova senha"}}),(0,a.jsx)(o.oH,{control:t,errors:l,name:"confirm_password",title:"Confirmar nova senha",className:"w-full",securityEntry:!0,customLeftElement:(0,a.jsx)(f(),{alt:"",src:u.Z,width:20}),validator:{required:"Confirme sua nova senha"}}),(0,a.jsx)(r.A,{className:"rounded-full flex-grow semibold w-full mt-4 bg-[#FF7B2E]",isLoading:N,onClick:p(function(e){b("/users/alter_password",e).then(e=>{(200===e.status||201===e.status)&&F()})}),children:"Atualizar"})]}):(0,a.jsxs)("div",{className:"flex flex-col justify-center items-center h-full",children:[(0,a.jsx)("img",{src:g.Z.src,style:{width:"120px"}}),(0,a.jsx)("h4",{className:"text-center mt-[10px] semibold",children:"Voc\xea precisa ativar o 2FA antes de poder alterar sua senha."}),(0,a.jsx)(r.A,{onClick:()=>s.push("/profile/security"),style:{backgroundColor:"#FF7B2E",color:"#000",fontWeight:"700",padding:"5px 40px",marginTop:"30px"},children:"Ativar 2FA"})]}),(0,a.jsx)(n.R,{size:"md",isOpen:_,hideCloseButton:!0,children:(0,a.jsx)(d.A,{className:"bg-white",children:()=>(0,a.jsx)(a.Fragment,{children:(0,a.jsx)(c.I,{className:"border-t-[12px] border-[#FF7B2E]",children:(0,a.jsxs)("div",{className:"flex flex-col items-center gap-4 p-4",children:[(0,a.jsx)(f(),{alt:"",src:v}),(0,a.jsx)("p",{className:"text-black text-[18px] semibold text-center",children:"Senha alterada com sucesso!"}),(0,a.jsx)("div",{children:(0,a.jsx)("p",{className:"text-[16px]",children:"Parab\xe9ns! Sua senha foi alterada com sucesso e voc\xea j\xe1 pode utilizar a nova senha quando for acessar sua conta novamente."})}),(0,a.jsx)("div",{className:"flex gap-4 w-full",children:(0,a.jsx)(r.A,{className:"rounded-full flex-grow semibold bg-[#FF7B2E]",onClick:Z,children:"Ok"})})]})})})})})]})};b.getLayout=function(e){return(0,a.jsx)(l.Z,{children:e})};var N=b},34210:function(e,s,t){"use strict";t.d(s,{k:function(){return x}});var a=t(31204),l=t(67294),i=t(15607),r=t(33295),n=t(49869),d=t(85893),c=(0,i.Gp)((e,s)=>{let{as:t,children:i,className:c,...x}=e,{slots:o,classNames:m,headerId:h,setHeaderMounted:u}=(0,a.v)(),p=(0,r.gy)(s);return(0,l.useEffect)(()=>(u(!0),()=>u(!1)),[u]),(0,d.jsx)(t||"header",{ref:p,className:o.header({class:(0,n.W)(null==m?void 0:m.header,c)}),id:h,...x,children:i})});c.displayName="NextUI.ModalHeader";var x=c}},function(e){e.O(0,[3365,4885,4838,4396,509,7473,5733,4143,5675,7739,1664,4691,9926,1716,6260,6697,2888,9774,179],function(){return e(e.s=78196)}),_N_E=e.O()}]);