1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7534],{67534:(e,t,r)=>{r.r(t),r.d(t,{default:()=>x});var s=r(95155),a=r(12115),o=r(4474),n=r(74350),l=r(389),c=r(66609),i=r(35927),u=r(37002),h=r(2693),d=r(23591),p=r(68477);let x=({isUserPhoneModalOpen:e,setIsUserPhoneModalOpen:t,userPhoneError:r,setUserPhoneError:x,deliveryLocation:m,handleUpdateUserPhone:b,isUpdatingPhone:f,onSuccess:w})=>{let[g,y]=(0,a.useState)(!1),[v,j]=(0,a.useState)(""),[C,N]=(0,a.useState)(void 0),k=(0,u.useGlobalStore)(e=>e.setField),{language:_}=(0,h.n)(),P=d.P[_],U=r??v,E=x??j,F=f??g,M=async()=>{if(b)return void b();if(!C||!C.trim())return void E(P.checkout?.phone_number_required||"Mobile number is required");try{y(!0),E("");let e=await (0,i.r7)({PhoneNumber:C});if(e?.Success||e?.User)c.oR.success("Phone number updated successfully"),await (0,p.G)(k),t(!1),w&&setTimeout(()=>{w()},100);else{let t=e?.Message||"Failed to update phone number";E(t),c.oR.error(t)}}catch(t){let e=t?.Message||t?.message||"Failed to update phone number";E(e),c.oR.error(e)}finally{y(!1)}};return(0,s.jsx)(n.lG,{open:e,onOpenChange:e=>{e||t(!1)},children:(0,s.jsxs)(n.Cf,{onOpenAutoFocus:e=>e.preventDefault(),className:"mx-auto max-h-[85vh] h-auto w-[95%] md:w-[440px] flex flex-col p-6 border border-white/10 squircle bg_secondary text-white gap-5 shadow-2xl",children:[(0,s.jsxs)(n.c7,{className:"p-0 border-b-0 space-y-1",children:[(0,s.jsx)(n.L3,{className:"text-left text-xl font-bold text-white font-bricolage",children:P.checkout.your_mobile_whatsapp||"Your Mobile/Whatsapp Number"}),(0,s.jsx)("p",{className:"text-sm text-white/60 text-left",children:P.checkout.provide_mobile_desc||"Please provide your number in case we need to contact you regarding your order."})]}),(0,s.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,s.jsx)(l.L,{value:C,onChange:e=>{N(e),E("")},initialCountryCode:m?.CountryIso2??"BD",placeholder:P.checkout.enter_mobile||"Enter mobile number",hasError:!!U}),U&&(0,s.jsx)("p",{className:"text-red-400 text-xs font-thin mt-1 ml-1",children:U})]}),(0,s.jsxs)("div",{className:"flex items-center justify-end gap-3 pt-2",children:[(0,s.jsx)(o.$,{variant:"ghost",onClick:()=>t(!1),className:"rounded-full px-5 h-[52px] text-white/70 hover:text-white hover:bg-white/10 cursor-pointer",disabled:F,children:P.checkout.cancel}),(0,s.jsx)(o.$,{onClick:M,disabled:F,className:"squircle px-6 h-[52px] bg-[#19734a] hover:bg-[#19734a]/80 text-white font-bold transition-all shadow-md flex items-center gap-2 cursor-pointer ",children:F?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("svg",{className:"animate-spin h-4 w-4 text-white",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[(0,s.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,s.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),P.checkout.updating||"Updating..."]}):P.checkout.update_continue||"Update & Continue"})]})]})})}},68477:(e,t,r)=>{r.d(t,{G:()=>n,v:()=>l});var s=r(37002),a=r(35927),o=r(27714);async function n(e){try{let t=await (0,a.wz)();e(s.X.CurrentUser,t)}catch{}}async function l(e){try{let t=await (0,o.Rr)();t&&e(s.X.Currency,t)}catch{}}}}]);
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.