1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6231],{1468:(e,t,n)=>{n.d(t,{A:()=>c});var i=n(37876),s=n(35003),l=n(95062),a=n.n(l),d=n(82),r=n(51707);let o=e=>{let{text:t,textAlign:n,textTransform:l,fontWeight:a,...o}=e,{t:c}=(0,d.Bd)();return(0,i.jsx)(s.A,{component:"h1",textAlign:n||"center",fontWeight:a||"700",lineHeight:(0,r.u)()?"10px":"30px",sx:{fontSize:{xs:"15px",md:"22px"}},textTransform:l,...o,children:c(t)})};o.propTypes={text:a().string.isRequired};let c=o},10561:(e,t,n)=>{n.d(t,{A:()=>I});var i=n(37876),s=n(14232),l=n(28343),a=n(14379),d=n(82179),r=n(74441),o=n(35003),c=n(7227),x=n(89515),p=n(71733),h=n(97914),u=n(85779),m=n(1383),g=n(54372),j=n(21398),A=n(51499),f=n(36675),y=n(74695),v=n(62320),w=n(41681),C=n(52904),b=n(84421),_=n(48910),S=n(42410),k=n(1311),L=n(31450);let z=(0,a.A)(l.jB)(e=>{let{theme:t}=e;return{borderRadius:"5px",border:"1px solid",borderColor:(0,r.X4)(t.palette.primary.main,.5),boxShadow:"px 3px 20px -5px rgba(3, 157, 85, 0.10)",padding:"15px",alignItems:"center",background:t.palette.neutral[100],cursor:"pointer"}}),I=e=>{let{setPaymentMethod:t,paymentMethod:n,zoneData:a,configData:r,orderType:I,usePartialPayment:P,forprescription:W,offlinePaymentOptions:T,setSwitchToWallet:E,isZoneDigital:D,setPaymentMethodImage:M,paymentMethodImage:B,handlePartialPayment:R,walletBalance:F,removePartialPayment:H,switchToWallet:N,customerData:O,payableAmount:G,changeAmount:Z,setChangeAmount:V,pricingBlocked:q}=e,[X,U]=(0,s.useState)(!1),{offlineMethod:Y}=(0,y.d4)(e=>e.offlinePayment),J=(0,j.u)(),K=(0,y.wA)();return(0,s.useEffect)(()=>{q&&U(!1)},[q]),(0,s.useEffect)(()=>{(null==n?void 0:n.match("offline_payment"))?(K((0,v.im)(1)),M(S.A)):K((0,v.im)(0)),"cash_on_delivery"===n?M(_.A.src):"wallet"===n&&M(b.A.src)},[n]),(0,i.jsxs)(l.jB,{spacing:2,children:[(0,i.jsx)(m.Zs,{const:!0,id:"demo-row-radio-buttons-group-label",children:(0,h.t)("Payment Method")}),(0,i.jsxs)(z,{direction:"row",justifyContent:"space-between",onClick:()=>{q||U(!0)},sx:{justifyContent:"space-between",opacity:q?.5:1,cursor:q?"not-allowed":"pointer"},children:[n||P?(0,i.jsxs)(d.A,{direction:"row",gap:1,alignItems:"center",children:[(null==n?void 0:n.match("offline_payment"))?(0,i.jsx)(S.A,{}):(0,i.jsx)(i.Fragment,{children:P?(0,i.jsx)(k.A,{style:{width:"20px",height:"20px"}}):(0,i.jsx)(C.A,{src:B,width:"auto",height:"20px",alt:"Payment Method Image",objectfit:"contain"})}),(0,i.jsxs)(o.A,{fontSize:"12px",fontWeight:"500",component:"span",textTransform:"capitalize",children:[P?(0,h.t)("Paid By Wallet"):"offline_payment"===n?"".concat(null==n?void 0:n.replaceAll("_"," ")," (").concat(null==Y?void 0:Y.method_name,")"):(0,h.t)(null==n?void 0:n.replaceAll("_"," "))," ",":"," ",(0,i.jsx)(o.A,{component:"span",fontWeight:"500",fontSize:"12px",children:q?"--":(0,L.Yi)(P?F:G)})]}),P&&n&&(0,i.jsxs)(o.A,{fontSize:"12px",fontWeight:"500",component:"span",textTransform:"capitalize",paddingInlineStart:{xs:"0xp",md:"50px"},children:["offline_payment"===n?"".concat((0,h.t)("offline payment")," (").concat(null==Y?void 0:Y.method_name,")"):(0,h.t)(n.replaceAll("_"," "))," ",(0,h.t)("(Due)")," :"," ",(0,i.jsx)(o.A,{component:"span",fontWeight:"500",fontSize:"12px",children:q?"--":(0,L.Yi)(G-F)})]})]}):(0,i.jsxs)(d.A,{direction:"row",alignItems:"center",spacing:1,children:[(0,i.jsx)(k.A,{style:{width:"20px",height:"20px"}}),(0,i.jsx)(o.A,{fontSize:"12px",fontWeight:"500",children:(0,h.t)("Select Payment Method")}),(0,i.jsx)(d.A,{sx:{cursor:"pointer"},children:(0,i.jsx)(c.A,{arrow:!0,placement:"top",TransitionComponent:x.A,title:(0,h.t)("Please select a payment method"),children:(0,i.jsx)(u.A,{style:{width:"16px",height:"16px"}})})})]}),(0,i.jsx)(g.A,{style:{width:"20px",height:"20px"},color:"primary"})]}),X&&(0,i.jsxs)(A.A,{openModal:X,handleClose:()=>U(!1),minWidth:"300px",maxWidth:"660px",children:[(0,i.jsx)(l.jB,{direction:"row",alignItems:"center",justifyContent:"flex-end",sx:{position:"relative"},children:(0,i.jsx)(p.A,{onClick:()=>U(!1),sx:{zIndex:"99",position:"absolute",top:10,right:10,backgroundColor:e=>e.palette.neutral[100],borderRadius:"50%",[J.breakpoints.down("md")]:{top:10,right:5}},children:(0,i.jsx)(w.A,{sx:{fontSize:"16px",fontWeight:"500"}})})}),(0,i.jsx)(f.A,{setPaymentMethod:t,paymentMethod:n,zoneData:a,configData:r,orderType:I,usePartialPayment:P,setOpenModel:U,forprescription:W,offlinePaymentOptions:T,paymentMethodImage:B,setPaymentMethodImage:M,setSwitchToWallet:E,isZoneDigital:D,handlePartialPayment:R,walletBalance:F,removePartialPayment:H,switchToWallet:N,customerData:O,payableAmount:G,changeAmount:Z,setChangeAmount:V})]})]})}},18230:(e,t,n)=>{n.d(t,{i:()=>G,A:()=>V});var i=n(37876),s=n(14232),l=n(39501),a=n(28343),d=n(35268),r=n(84812),o=n(6995),c=n(35003),x=n(41316),p=n(19055),h=n(82179),u=n(89037),m=n(22185);let g={src:"/_next/static/media/Group 1597886316.6d8a16a7.svg",height:56,width:77,blurWidth:0,blurHeight:0};var j=n(62712);let A=()=>(0,i.jsx)(a.iv,{children:(0,i.jsx)(x.Ay,{container:!0,spacing:3,children:[void 0,void 0].map((e,t)=>(0,i.jsx)(x.Ay,{item:!0,xs:12,sm:6,md:6,children:(0,i.jsx)(j.A,{variant:"rectangular",width:"100%",height:"10rem"})},t))})});var f=n(74441);n(45485);var y=n(71733);let v={src:"/_next/static/media/delete-icon.7460c87d.png"};var w=n(82),C=n(51499),b=n(58582),_=n(60398),S=n(64907),k=n(1992);let L=async e=>{let{data:t}=await _.A.delete("".concat(S.Ch,"?address_id=").concat(e));return t};var z=n(97685),I=n(77165),P=n(3801);let W={src:"/_next/static/media/mapMarker.0e641af6.png"},T=e=>{let{open:t,handleClose:n,addressId:s,refetch:l}=e,{t:d}=(0,w.Bd)(),{mutate:o,isLoading:x,error:p}=(0,k.useMutation)("delete-address",L);return(0,i.jsx)("div",{children:(0,i.jsx)(C.A,{openModal:t,handleClose:n,children:(0,i.jsx)(b.A,{sx:{textAlign:"center",padding:"2rem"}
1,children:(0,i.jsxs)(a.jB,{alignItems:"center",justifyContent:"center",spacing:3,children:[(0,i.jsx)("img",{src:W.src,alt:d("map-image"),width:"60px",height:"60px"}),(0,i.jsx)(c.A,{fontWeight:"bold",variant:"h6",children:d("Are you sure you want to delete this address?")}),(0,i.jsxs)(a.jB,{direction:"row",alignItems:"center",justifyContent:"center",spacing:2,children:[(0,i.jsx)(r.A,{sx:{backgroundColor:e=>e.palette.neutral[300],color:e=>e.palette.neutral[1e3],width:"120px","&:hover":{backgroundColor:e=>e.palette.neutral[400]}},onClick:n,children:d("Cancel")}),(0,i.jsx)(P.A,{loading:x,sx:{background:e=>e.palette.error.light,color:"white",width:"120px","&:hover":{backgroundColor:e=>e.palette.error.dark}},onClick:()=>void o(s,{onSuccess:()=>{z.Ay.success(d("Address deleted successfully.")),null==l||l(),null==n||n()},onError:I.P1}),children:d("Delete")})]})]})})})})};var E=n(66703);let D=()=>{let e=(0,E.A)();return(0,i.jsx)("svg",{width:"21",height:"20",viewBox:"0 0 21 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,i.jsx)("path",{d:"M9.22685 9.16536H10.9883L16.1886 3.9987L14.4272 2.2487L9.22685 7.41536V9.16536ZM16.7758 3.41536L17.3629 2.83203C17.5307 2.66536 17.6145 2.47092 17.6145 2.2487C17.6145 2.02648 17.5307 1.83203 17.3629 1.66536L16.7758 1.08203C16.608 0.915365 16.4123 0.832031 16.1886 0.832031C15.9649 0.832031 15.7692 0.915365 15.6015 1.08203L15.0143 1.66536L16.7758 3.41536ZM10.0656 18.332C7.81492 16.4293 6.13403 14.6618 5.02294 13.0295C3.91129 11.3979 3.35547 9.88759 3.35547 8.4987C3.35547 6.41536 4.03012 4.75564 5.37942 3.51953C6.72816 2.28342 8.29022 1.66536 10.0656 1.66536C10.4431 1.66536 10.8172 1.69648 11.1879 1.7587C11.5581 1.82148 11.9179 1.90842 12.2674 2.01953L10.9044 3.39453C10.7646 3.36675 10.6281 3.34925 10.4951 3.34203C10.3625 3.33536 10.2194 3.33203 10.0656 3.33203C8.65369 3.33203 7.4618 3.81453 6.48995 4.77953C5.51865 5.74509 5.033 6.98481 5.033 8.4987C5.033 9.48481 5.4454 10.6131 6.27019 11.8837C7.09498 13.1548 8.36012 14.5681 10.0656 16.1237C11.7711 14.5681 13.0363 13.1548 13.861 11.8837C14.6858 10.6131 15.0982 9.48481 15.0982 8.4987C15.0982 8.33203 15.0912 8.1687 15.0773 8.0087C15.0633 7.84925 15.0423 7.69314 15.0143 7.54036L16.3983 6.16536C16.5241 6.52648 16.6186 6.90148 16.6818 7.29036C16.7444 7.67925 16.7758 8.08203 16.7758 8.4987C16.7758 9.88759 16.2202 11.3979 15.1091 13.0295C13.9975 14.6618 12.3163 16.4293 10.0656 18.332Z",fill:e.palette.primary.main})})};n(11534),n(72500);var M=n(97914),B=n(74695);let R=(0,d.Ay)(c.A)(e=>{let{theme:t,fontWeight:n}=e;return{fontWeight:n||"500",fontSize:"12px"}}),F=e=>{let{item:t,refetch:n,dispatch:l,configData:d,edit:r,setEditAddress:o,setAddAddress:x}=e,{address_type:p,contact_person_number:u,address:m,road:g,floor:j,house:A,latitude:C,longitude:b,user_id:_,contact_person_name:S,zone_id:k,id:L}=t,{t:z}=(0,w.Bd)(),[I,P]=(0,s.useState)(!1),{openAddressModal:W}=(0,B.d4)(e=>e.addressModel);return(0,i.jsxs)(a.WU,{padding:"0px",sx:{borderRadius:"5px",boxShadow:"0px 9.075414657592773px 18.150829315185547px -2.7226247787475586px rgba(145, 158, 171, 0.05), 0px 0px 1.8150832653045654px 0px rgba(145, 158, 171, 0.20)"},children:[(0,i.jsxs)(a.jB,{spacing:2,children:[(0,i.jsxs)(a.jB,{direction:"row",alignItems:"center",justifyContent:"space-between",padding:{xs:" 4px 20px",md:" 13px 20px"},sx:{background:e=>(0,f.X4)(e.palette.info.contrastText1,.3),borderRadius:"5px 5px 0px 0px"},children:[(0,i.jsx)(c.A,{fontWeight:"500",textTransform:"capitalize",children:z(p)}),(0,i.jsxs)(h.A,{direction:"row",alignItems:"center",children:[(0,i.jsx)(y.A,{onClick:()=>{o(t),x(e=>!e)},children:(0,i.jsx)(D,{})}),(0,i.jsx)(y.A,{onClick:()=>P(!0),children:(0,i.jsx)("img",{src:v.src,alt:"delete"})})]})]}),(0,i.jsxs)(h.A,{padding:"0px 20px 23px 20px",spacing:1,children:[(0,i.jsxs)(h.A,{direction:"row",gap:"30px",children:[(0,i.jsx)(R,{children:z("Name")}),(0,i.jsx)(R,{fontWeight:"400",children:S})]}),(0,i.jsxs)(h.A,{direction:"row",gap:"25px",children:[(0,i.jsx)(R,{children:z("Phone")}),(0,i.jsx)(R,{fontWeight:"400",children:u})]}),(0,i.jsxs)(h.A,{direction:"row",gap:"15px",children:[(0,i.jsx)(R,{children:z("Address")}),(0,i.jsxs)(R,{fontWeight:"400",children:[" ",m]})]})]})]}),I&&(0,i.jsx)(T,{open:I,handleClose:()=>P(!1),addressId:L,refetch:n})]})};F.propTypes={};var H=n(84063),N=n(21398),O=n(6664);let G=(0,d.Ay)(r.A)(e=>{let{theme:t}=e;return{color:t.palette.neutral[400],fontSize:"12px",border:"1px solid",borderColor:t.palette.neutral[400],borderRadius:"5px"}}),Z=e=>{let{configData:t,setAddAddress:n,addAddress:d,setEditAddress:r,data:j,refetch:f,isLoading:y}=e,{AllSaveAddress:v}=(0,B.d4)(e=>e.storedData),w=(0,B.wA)(),C=(0,N.u)(),b=(0,o.A)(C.breakpoints.down("md")),{openAddressModal:_}=(0,B.d4)(e=>
1e.addressModel),[S,k]=(0,s.useState)(null);(0,s.useEffect)(()=>{(null==v?void 0:v.length)===0&&f()},[]),(0,s.useEffect)(()=>{j&&w((0,O.p_)(null==j?void 0:j.addresses))},[j]);let L=()=>{r(null),n(e=>!e)};return(0,i.jsxs)(a.jB,{padding:{xs:"10px",sm:"15px",md:"20px"},spacing:2,children:[(0,i.jsxs)(a.jB,{justifyContent:"space-between",direction:"row",alignItems:"center",children:[(0,i.jsx)(c.A,{fontSize:{xs:"14px",sm:"14px",md:"16px"},fontWeight:"700",children:(0,M.t)("My Addresses")}),(0,i.jsx)(h.A,{children:b?(0,i.jsx)(H.H,{onClick:L,children:(0,i.jsx)(l.A,{style:{fontSize:"16px"}})}):(0,i.jsx)(G,{onClick:L,variant:"outlined",startIcon:(0,i.jsx)(l.A,{style:{fontSize:"16px"}}),children:(0,M.t)("Add Address")})})]}),(0,i.jsx)(x.Ay,{container:!0,spacing:{xs:1,sm:1.5,md:2.5},children:(0,i.jsx)(x.Ay,{item:!0,xs:12,md:12,children:(0,i.jsx)(p.A,{children:y?(0,i.jsx)(A,{}):v&&(null==v?void 0:v.length)>0?(0,i.jsx)(u.A,{children:(0,i.jsx)(x.Ay,{container:!0,children:null==v?void 0:v.map((e,s)=>(0,i.jsx)(x.Ay,{item:!0,xs:12,sm:6,md:6,lg:6,paddingRight:{xs:"10px",sm:"15px",md:"25px"},paddingBottom:{xs:"10px",sm:"15px",md:"25px"},children:(0,i.jsx)(F,{item:e,refetch:f,configData:t,dispatch:w,openAddressModal:_,setEditAddress:r,edit:S,setAddAddress:n})},e.id))})}):(0,i.jsx)(h.A,{alignItems:"center",justifyContent:"center",width:"100%",height:"100%",children:(0,i.jsx)(m.A,{label:"No address found",image:g,width:"128px",height:"80"})})})})})]})};Z.propTypes={};let V=Z},72028:(e,t,n)=>{n.d(t,{A:()=>d});var i=n(37876),s=n(14232),l=n(89099),a=n(74695);let d=e=>{let{children:t,from:n}=e,d=(0,l.useRouter)(),{orderId:r}=d.query,[o,c]=(0,s.useState)(!1),{configData:x}=(0,a.d4)(e=>e.configData);return((0,s.useEffect)(()=>{if(!d.isReady)return;let e=localStorage.getItem("token"),t=localStorage.getItem("guest_id");e||t||t&&(null==x?void 0:x.guest_checkout_status)===1||(e||t)&&r?c(!0):d.push({pathname:"/",query:{from:n}},void 0,{shallow:!0})},[d.isReady]),o)?(0,i.jsx)(i.Fragment,{children:t}):null}},84063:(e,t,n)=>{n.d(t,{H:()=>G,A:()=>V});var i=n(37876),s=n(14232),l=n(28343),a=n(71733),d=n(6995),r=n(41316),o=n(35003),c=n(62712),x=n(84812),p=n(58413),h=n(14379),u=n(82179),m=n(89037);n(19799),n(22643),n(82),n(86200),n(39091),n(1468),n(97144),n(97685),n(77165),n(11534);var g=n(66703),j=n(60795),A=n(40950),f=n(97914),y=n(59115),v=n(66807),w=n(73862),C=n(54427),b=n(11131),_=n(18538),S=n(13880),k=n(76209),L=n(52904),z=n(16007),I=n(17764),P=n(65312),W=n(18532),T=n(35268),E=n(74695),D=n(25773);let M=(0,T.Ay)(m.A)(e=>{let{theme:t}=e;return{position:"absolute",zIndex:"999",width:"85%",top:"10%",marginLeft:"20px",[t.breakpoints.down("md")]:{marginLeft:"13px"}}}),B=e=>{var t;let{setAddAddress:n,editAddress:d,userData:c,addressRefetch:x,setEditAddress:h}=e;(0,g.A)();
1let[u,m]=(0,s.useReducer)(y.Ff,y.ue),[T,B]=(0,s.useState)(d?null==d?void 0:d.address_type:""),{configData:R}=(0,E.d4)(e=>e.configData),[F,H]=(0,s.useState)(!1),[N,O]=(0,s.useState)(!1),[G,Z]=(0,s.useState)(R&&(null==R?void 0:R.default_location)),[V,q]=(0,s.useState)(""),[X,U]=(0,s.useState)(!1),[Y,J]=(0,s.useState)(!0),[K,Q]=(0,s.useState)(void 0),[$,ee]=(0,s.useState)([]),[et,en]=(0,s.useState)(""),{coords:ei,isGeolocationAvailable:es,isGeolocationEnabled:el,getPosition:ea}=(0,v.L)({positionOptions:{enableHighAccuracy:!1},userDecisionTimeout:5e3,isGeolocationEnabled:!0}),{data:ed,isLoading:er}=(0,w.A)(V,X);(0,s.useEffect)(()=>{if(ed){var e;ee(null==ed||null==(e=ed.suggestions)?void 0:e.map(e=>{var t,n,i,s,l,a,d;return{place_id:null==e||null==(t=e.placePrediction)?void 0:t.placeId,description:"".concat(null==e||null==(s=e.placePrediction)||null==(i=s.structuredFormat)||null==(n=i.mainText)?void 0:n.text,", ").concat(null==e||null==(d=e.placePrediction)||null==(a=d.structuredFormat)||null==(l=a.secondaryText)?void 0:l.text)}}))}},[ed]);let{data:eo}=(0,b.A)(G,N);(0,s.useEffect)(()=>{eo&&localStorage.setItem("zoneid",null==eo?void 0:eo.zone_id)},[eo]);let{isLoading:ec,data:ex}=(0,_.A)(et,Y);(0,s.useEffect)(()=>{if(ex){var e,t;Z({lat:null==ex||null==(e=ex.location)?void 0:e.latitude,lng:null==ex||null==(t=ex.location)?void 0:t.longitude}),O(!0)}},[ex]);let{data:ep,isFetching:eh}=(0,C.A)(G),eu=e=>{B(e),h({...d,address_type:null})};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(r.Ay,{item:!0,md:12,xs:12,alignSelf:"center",children:(0,i.jsxs)(j.A,{direction:"row",justifyContent:"space-between",alignItems:"center",children:[(0,i.jsx)(o.A,{variant:"subtitle2",fontWeight:"700",children:(0,f.t)("Add Address")}),(0,i.jsxs)(p.NX,{onClick:()=>n(!1),children:[(0,i.jsx)(A.A,{sx:{fontSize:"10px",color:e=>e.palette.primary.main,fontWeight:"700",marginRight:"3px"}}),(0,f.t)("Go Back")]})]})}),(0,i.jsxs)(r.Ay,{item:!0,xs:12,md:5,position:"relative",align:"center",children:[(0,i.jsx)(M,{children:(0,i.jsx)(k.A,{predictions:$,handleChange:(e,t)=>
1((e,t)=>{t&&en(null==t?void 0:t.place_id),J(!0)})(0,t,m),HandleChangeForSearch:e=>(e=>{e.target.value&&(q(e.target.value),U(!0),J(!0))})(e,m),handleAgreeLocation:()=>((e,t)=>{e?(t({type:y.kl.setLocation,payload:{lat:null==e?void 0:e.latitude,lng:null==e?void 0:e.longitude}}),t({type:y.kl.setOpenLocation,payload:!1}),t({type:y.kl.setShowCurrentLocation,payload:!0}),t({type:y.kl.setGeoLocationEnable,payload:!0})):t({type:y.kl.setOpenLocation,payload:!0})})(ei,m),currentLocation:u.currentLocation,handleCloseLocation:()=>(e=>{e({type:y.kl.setOpenLocation,payload:!1}),e({type:y.kl.setShowCurrentLocation,payload:!1}),e({type:y.kl.setGeoLocationEnable,payload:!1}),e({type:y.kl.setCurrentLocation,payload:""})})(m),notShow:!0})}),(0,i.jsxs)(j.A,{children:[G&&(0,i.jsx)(S.A,{setLocation:Z,location:G,setPlaceDetailsEnabled:J,placeDetailsEnabled:Y,locationEnabled:N,setPlaceDescription:Q,setLocationEnabled:O,setDisablePickButton:H,height:"350px"}),(0,i.jsx)(a.A,{onClick:()=>{Z({lat:ei.latitude,lng:ei.longitude})},sx:{position:"absolute",bottom:{xs:"18%",md:"28%"},right:"10px",borderRadius:"50%",color:e=>e.palette.primary.main,backgroundColor:"background.paper"},children:(0,i.jsx)(D.A,{sx:{fontSize:{xs:"18px",md:"24px"}}})})]})]}),(0,i.jsxs)(r.Ay,{item:!0,xs:12,md:7,children:[(0,i.jsxs)(l.jB,{mb:"20px",children:[(0,i.jsx)(o.A,{children:(0,f.t)("Label As")}),(0,i.jsxs)(j.A,{direction:"row",spacing:2.5,pt:"10px",children:[(0,i.jsx)(l.TV,{value:"home",addressType:(null==d?void 0:d.address_type)?null==d?void 0:d.address_type:T,onClick:()=>eu("home"),children:(0,i.jsx)(L.A,{src:z.A.src,width:"24px",height:"24px"})}),(0,i.jsx)(l.TV,{value:"office",addressType:(null==d?void 0:d.address_type)?null==d?void 0:d.address_type:T,onClick:()=>eu("office"),children:(0,i.jsx)(L.A,{src:I.A.src,width:"24px",height:"24px"})}),(0,i.jsx)(l.TV,{value:"other",addressType:(null==d?void 0:d.address_type)?null==d?void 0:d.address_type:T,onClick:()=>eu("other"),children:(0,i.jsx)(L.A,{src:P.A.src,width:"24px",height:"24px"})})]})]}),(0,i.jsx)(W.A,{deliveryAddress:null==ep||null==(t=ep.results[0])?void 0:t.formatted_address,atModal:"false",addressType:T,configData:R,phone:d?null==d?void 0:d.phone:null==c?void 0:c.phone,email:d?null==d?void 0:d.email:null==c?void 0:c.email,lat:(null==G?void 0:G.lat)||"",lng:(null==G?void 0:G.lng)||"",personName:d?null==d?void 0:d.contact_person_name:c&&"".concat(null==c?void 0:c.f_name," ").concat(null==c?void 0:c.l_name),editAddress:d,setAddAddress:n,refetch:x})]})]})},R={src:"/_next/static/media/editIcon.95a0ff40.png"};var F=n(21398),H=n(54372),N=n(83342),O=n(46824);let G=(0,h.A)(a.A)(e=>{let{theme:t}=e;return{border:"1px solid",borderColor:t.palette.neutral[400],borderRadius:"50%",padding:"6px"}}),Z=e=>{var t,n;let{data:s,t:l,refetch:a,setEditProfile:h,editProfile:g,setAddAddress:j,addAddress:A,editAddress:f,addressRefetch:y,setEditAddress:v}=e,w=(0,F.u)(),{configData:C}=(0,E.d4)(e=>e.configData),b=(0,d.A)(w.breakpoints.down("md")),_=()=>{h(e=>!e)};return(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(r.Ay,{container:!0,spacing:{xs:1,sm:2,md:3},padding:{xs:"10px",sm:"15px",md:"20px"},children:A?(0,i.jsx)(r.Ay,{container:!0,item:!0,xs:12,md:12,spacing:3,children:(0,i.jsx)(B,{setAddAddress:j,configData:C,userData:s,editAddress:f,addressRefetch:y,setEditAddress:v})}):(0,i.jsx)(i.Fragment,{children:g?(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(r.Ay,{container:!0,item:!0,xs:12,md:12,children:(0,i.jsx)(p.Ay,{data:s,configData:C,setEditProfile:h,handleClick:_,t:l,refetch:a})})}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(r.Ay,{item:!0,md:12,xs:12,children:(0,i.jsxs)(u.A,{direction:"row",justifyContent:"space-between",alignItems:"center",children:[(0,i.jsx)(o.A,{fontSize:{xs:"14px",sm:"14px",md:"16px"},fontWeight:"700",children:l("Personal Details")}),b&&(0,i.jsx)(G,{onClick:_,children:(0,i.jsx)(L.A,{src:R.src,height:"16px",width:"16px"})})]})}),(0,i.jsx)(r.Ay,{item:!0,xs:12,md:3,children:(0,i.jsx)(u.A,{spacing:{xs:1,sm:1,md:1},paddingLeft:{xs:"0px",md:"20px"},children:s?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(o.A,{fontWeight:"500",fontSize:{xs:"12px",md:"14px"},children:[l("User Name"),(0,i.jsx)(o.A,{component:"span",marginLeft:{xs:"13px",md:"10px"},fontSize:{xs:"12px",md:"14px"},children:"".concat((null==s?void 0:s.f_name)?null==s?void 0:s.f_name:""," ").concat((null==s?void 0:s.l_name)?null==s?void 0:s.l_name:"")})]}),(0,i.jsxs)(m.A,{display:"flex",alignItems:"center",fontWeight:"500",fontSize:{xs:"12px",md:"14px"},children:[(0,i.jsx)(o.A,{component:"span",fontSize:{xs:"12px",md:"14px"},children:l("Email")}),(0,i.jsx)(o.A,{fontSize:{xs:"12px",md:"14px"},component:"span",marginLeft:{xs:"8px",md:"8px"},children:(null==s?void 0:s.email)||""}),(null==s?void 0:s.is_email_verified)==="1"?(0,i.jsx)(N.A,{style:{marginLeft:"8px"}}):(null==C||null==(t=C.centralize_login)?void 0:t.email_verification_status)===1&&(0,i.jsx)(O.A,{sx:{color:e=>e.palette.error.main,width:"1.2rem",marginLeft:"8px"}})]})]}):(0,i.jsxs)(u.A,{children:[(0,i.jsx)(c.A,{variant:"text",width:150,height:20}),(0,i.jsx)(c.A,{variant:"text",width:150,height:20})]})})}),(0,i.jsx)(r.Ay,{item:!0,xs:12,md:3,children:(0,i.jsx)(u.A,{spacing:{xs:1,sm:1,md:1},alignItems:{xs:"flex-start",md:"center"},width:"100%",justifyContent:"center",children:s?(0,i.jsxs)(m.A,{display:"flex",alignItems:"center",justifyContent:"center",children:[(0,i.jsx)(o.A,{fontWeight:"500",fontSize:{xs:"12px",md:"14px"},children:l("Phone")}),(0,i.jsxs)(o.A,{component:"span",fontSize:{xs:"12px",md:"14px"},marginLeft:{xs:"8px",md:"10px"},display:"flex",alignItems:"center",children:[null==s?void 0:s.phone,(null==s?void 0:s.is_phone_verified)===1?(0,i.jsx)(N.A,{style:{marginLeft:"8px"}}):(null==C||null==(n=C.centralize_login)?void 0:n.phone_verification_status)===1&&(0,i.jsx)(O.A,{sx:{color:e=>e.palette.error.main,width:"1.2rem",marginLeft:"8px"}})]})]}):(0,i.jsxs)(u.A,{children:[(0,i.jsx)(c.A,{variant:"text",width:170,height:20}),(0,i.jsx)(c.A,{variant:"text",width:170,height:20})]})})}),!b&&(0,i.jsx)(r.Ay,{item:!0,xs:6,md:6,align:"right",alignSelf:"flex-start",marginTop:{xs:"5px",md:"0px"},children:(0,i.jsx)(x.A,{onClick:_,variant:"contained",sx:{fontSize:"12px",borderRadius:"5px"},startIcon:(0,i.jsx)(H.A,{style:{width:"13px",height:"13px"}}),children:l("Edit Profile")})})]})})})})};Z.propTypes={};let V=Z}}]);
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.