1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7498],{23771:function(e,t,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/profile/my-cars",function(){return s(65453)}])},40089:function(e,t,s){"use strict";var a=s(85893),n=s(37871),l=s(68485),r=s(25675),i=s.n(r),c=s(8193);let o=e=>{let{title:t,dec:s,btn:r,onClick:o,onlyButton:x,values:m}=e,{isSmall:d,isMedium:u,isLarge:h,isXLarge:f,is2XLarge:g}=(0,l.F)(),b=d||u||h||f||g,{t:p}=(0,n.$G)();return x?(0,a.jsx)("div",{className:"text-center flex flex-col items-center justify-center w-full",children:(0,a.jsxs)("button",{onClick:()=>o(),className:"flex items-center gap-3 border-2 border-gray-300 rounded-full font-bold text-base text-primaryColor px-6 mt-3 py-2 sm:py-3 hover:bg-primaryColor hover:text-white duration-100",children:[(0,a.jsx)(c.Lh8,{})," ",p("pessanger.createAlert")]})}):(0,a.jsx)(a.Fragment,{children:(0,a.jsxs)("div",{className:"text-center flex flex-col items-center sm:my-0 my-12 justify-center",children:[(0,a.jsx)(i(),{src:"/static/images/noRequest.svg",width:b?65:40,height:b?65:40,alt:"Empty",loading:"lazy"}),(0,a.jsx)("p",{className:"font-semibold sm:font-bold sm:text-xl text-sm sm:mb-2",children:p(t,m)}),(0,a.jsx)("p",{className:"sm:text-gray-600 text-gray-400 text-xs sm:text-base sm:mb-5",children:p(s)}),r&&(0,a.jsxs)("button",{onClick:()=>o(),className:"flex items-center gap-3 border-2 border-gray-300 rounded-full font-bold text-base text-primaryColor px-6 mt-3 py-2 sm:py-3 hover:bg-primaryColor hover:text-white duration-100",children:[(0,a.jsx)(c.Lh8,{})," ",p("pessanger.createAlert")]})]})})};t.Z=o},93480:function(e,t,s){"use strict";var a=s(85893),n=s(11163),l=s(94735),r=s(37871),i=s(53854);let c=()=>{let{t:e}=(0,r.$G)(),t=(0,n.useRouter)(),s=async()=>{t.back()},{locale:c}=t;return(0,a.jsxs)("div",{className:"w-max flex items-center gap-3 cursor-pointer mb-5 ml-2 mt-4",onClick:s,children:["ar"===c?(0,a.jsx)(i.WY3,{className:"md:text-2xl base:text-xl text-xl cursor-pointer animate-[gotoBack_1s_ease_infinite]"}):(0,a.jsx)(i.jTe,{className:"md:text-2xl base:text-xl text-xl cursor-pointer animate-[gotoBack_1s_ease_infinite]"})," ",(0,a.jsx)(l.Z,{text:e("common.back"),containerTag:"span",className:"md:text-lg base:text-base text-sm font-bold text-zinc-950"})]})};t.Z=c},68485:function(e,t,s){"use strict";s.d(t,{F:function(){return l}});var a=s(67294);let n={xxxs:325,xxs:380,xs:475,sm:640,md:768,lg:1024,xl:1280,"2xl":1536},l=()=>{let[e,t]=(0,a.useState)(!1),[s,l]=(0,a.useState)(!1),[r,i]=(0,a.useState)(!1),[c,o]=(0,a.useState)(!1),[x,m]=(0,a.useState)(!1),[d,u]=(0,a.useState)(!1),[h,f]=(0,a.useState)(!1),[g,b]=(0,a.useState)(!1);return(0,a.useEffect)(()=>{let e=()=>{let{innerWidth:e}=window;t(e<n.xxxs),l(e<n.xxs),i(e<n.sm),o(e>=n.sm&&e<n.md),m(e>=n.md&&e<n.lg),u(e>=n.lg&&e<n.xl),f(e>=n.xl&&e<n["2xl"]),b(e>=n["2xl"])};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]),{isXXXSmall:e,isXXSmall:s,isXSmall:r,isSmall:c,isMedium:x,isLarge:d,isXLarge:h,is2XLarge:g}}},8728:function(e,t,s){"use strict";s.d(t,{J:function(){return r},cn:function(){return l}});var a=s(90512),n=s(98388);function l(){for(var e=arguments.length,t=Array(e),s=0;s<e;s++)t[s]=arguments[s];return(0,n.m6)((0,a.W)(t))}let r=e=>`https://pippipyalahcom.s3.eu-west-3.amazonaws.com/${e}`},65453:function(e,t,s){"use strict";s.r(t),s.d(t,{VehicleItem:function(){return j},__N_SSG:function(){return b},default:function(){return p}});var a=s(85893),n=s(67294),l=s(52501),r=s(94735),i=s(24351),c=s(40089),o=s(58881),x=s(11774),m=s(36503),d=s(37871),u=s(11163),h=s(89583),f=s(79352),g=s(93480),b=!0;function p(){let{t:e}=(0,d.$G)(),t=(0,u.useRouter)(),s=t.query,{id:x}=s,[h,f]=(0,n.useState)([]),[b,p]=(0,n.useState)(!1),[N,y]=(0,n.useState)(!1),[_,w]=(0,n.useState)(!1),[S,C]=(0,n.useState)(!1),[Z,k]=(0,n.useState)(!1),[T,E]=(0,n.useState)(!1),[z,F]=(0,n.useState)(""),[A,D]=(0,n.useState)(0);(0,n.useEffect)(()=>{x&&G()},[x]);let G=async()=>{y(!0);try{let e=await m.Z.getInstance().getVehicles(A);f(e.data.vehicles),p(5*e.data._pagination.totalPages),y(!1)}catch(e){y(!1)}},I=async()=>
1{if(k(!0),S)try{await m.Z.getInstance().deleteVehicle(null==S?void 0:S.vehicle_id),E(!0),k(!1),G()}catch(e){k(!1),E(!1),409==e.code?w(!1):F(e)}};return(0,a.jsxs)("main",{children:[(0,a.jsx)(l.default,{}),N?(0,a.jsx)("div",{className:"app-page h-80",children:(0,a.jsx)(o.Z,{})}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(v,{car:S,success:T,deletedError:z,isVisible:_,setIsVisible:w,loading:Z,onPressDelete:I}),(0,a.jsx)("div",{className:"app-page",children:(0,a.jsxs)("div",{className:"max-w-screen-md mx-auto px-3 overflow-visible",children:[(0,a.jsx)(g.Z,{}),(0,a.jsx)(r.Z,{text:"car.myCars",className:"md:text-3xl base:text-2xl text-xl font-bold",containerTag:"h1"}),(null==h?void 0:h.length)?(0,a.jsx)("div",{children:h.map((e,t)=>(0,a.jsx)("div",{className:"sm:mt-6",children:(0,a.jsx)(j,{item:e,onPress:()=>{C(e),w(!0),E(!1),F(!1)}})},t))}):(0,a.jsx)("div",{className:"mt-[80px]",children:(0,a.jsx)(c.Z,{title:e("car.noCars"),desc:e("car.noCarsDesc")})})]})})]}),(0,a.jsx)("div",{className:"flex mt-20 items-center justify-center",children:(0,a.jsx)(i.Z,{onClick:()=>t.push("/add-car/car-brands"),textClass:"text-black",className:"py-4 font-medium minMobScreen:text-slate-950 minMobScreen:bg-neutral-200 text-slate-950 bg-neutral-200 hover:bg-neutral-200 px-3",text:"car.addAnotherCar"})})]})}let j=e=>{let{item:t,onPress:s}=e;return(0,u.useRouter)(),(0,a.jsx)(a.Fragment,{children:(0,a.jsxs)("div",{className:"relative pr-10 flex items-center gap-4 cursor-pointer hover:bg-gray-100 rounded-2xl p-2",children:[(0,a.jsx)("div",{className:"bg-slate-200 rounded-lg flex items-center justify-center p-2",children:(0,a.jsx)(h.fSn,{className:"md:text-2xl base:text-xl text-lg text-zinc-700"})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"flex items-center gap-3",children:(0,a.jsx)("div",{className:"text-zinc-700 md:text-lg base:text-base text-sm font-semibold",children:(0,a.jsxs)("h1",{children:[null==t?void 0:t.brand_name," ",null==t?void 0:t.model_name]})})}),(0,a.jsx)("div",{className:"md:text-base base:text-sm text-xs text-gray-500 font-medium flex items-center gap-1",children:(0,a.jsxs)("h3",{children:[null==t?void 0:t.plate_id," | ",null==t?void 0:t.plate_letter," |"," ",null==t?void 0:t.plate_region_number]})})]}),(0,a.jsx)(f.qGf,{onClick:()=>s(),className:"absolute right-4 md:text-2xl base:text-xl text-lg font-medium cursor-pointer text-zinc-700"})]})})},v=e=>{let{isVisible:t,setIsVisible:s,deletedError:n,success:l,car:c,loading:o,onPressDelete:m}=e,{t:u}=(0,d.$G)();return(0,a.jsxs)(x.Z,{modalOpen:t,modalClose:s,children:[n?(0,a.jsx)(r.Z,{className:"font-bold text-xl",containerTag:"h1",additional:u("car.youCannotDeleteForNow",{name:null==c?void 0:c.brand_name})}):l?(0,a.jsx)(r.Z,{className:"font-bold text-xl",containerTag:"h1",text:"",additional:u("car.carHasBeenDeleted",{name:null==c?void 0:c.brand_name})}):(0,a.jsx)(r.Z,{className:"font-bold text-xl",containerTag:"h1",text:"car.wantToDeleteThis",additional:null==c?void 0:c.brand_name}),(0,a.jsx)("div",{className:"mt-5 mb-16",children:n?(0,a.jsx)(r.Z,{className:"text-base font-medium",containerTag:"p",text:"car.youHaveAnActiveCarpoolWithThis"}):l?null:(0,a.jsx)(r.Z,{className:"text-base font-medium",containerTag:"p",text:"common.pressDeleteToConfirm"})}),(0,a.jsx)("div",{className:"flex items-center justify-center gap-3 ",children:l||n?(0,a.jsx)(a.Fragment,{children:(0,a.jsx)(i.Z,{loading:o,text:n?"common.gotIt":"common.done",onClick:()=>s(!1)})}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(i.Z,{loading:o,onClick:()=>m(),text:"common.delete"}),(0,a.jsx)(i.Z,{text:"common.goBack",className:" minMobScreen:text-gray-900 minMobScreen:bg-neutral-200 text-gray-900 bg-neutral-200 hover:bg-neutral-200",onClick:()=>s(!1)})]})})]})}}},function(e){e.O(0,[9731,6764,7518,748,8971,4330,7958,9583,6284,8193,9352,2501,4920,7066,3109,1245,9763,381,2805,3033,6909,5847,1485,4157,453,4046,2888,6816,5960,745,6209,179],function(){return e(e.s=23771)}),_N_E=e.O()}]);
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.