"use strict";(self.webpackChunknational_aem=self.webpackChunknational_aem||[]).push([[5725],{52492:function(e,t,r){r.d(t,{Z:function(){return m}});var n=r(60564),i=r(32428),a=r(23750),o={current:function(e){return(0,a.ZP)({method:"GET",origin:n.at.GMA_ORIGIN_URL,endpoint:"trips/current",qs:e,withCredentials:!0})},upcoming:function(e){return(0,a.ZP)({method:"GET",origin:n.at.GMA_ORIGIN_URL,endpoint:"trips/upcoming",qs:e,withCredentials:!0})},past:function(e){return(0,a.ZP)({method:"POST",origin:n.at.GMA_ORIGIN_URL,endpoint:"trips/past",withCredentials:!0,data:e})},invoice:function(e){return(0,a.ZP)({method:"GET",origin:n.at.GMA_ORIGIN_URL,endpoint:"trips/invoice",qs:{invoiceNumber:e.invoiceNumber},withCredentials:!0,data:e})}},s=r(98899),c=r(16506),u={};function l(e){return function(t){var r=e.cacheKey,n=e.data,a=e.service,o=e.cursor,c=e.usePageLoader,l=void 0===c||c,m=u[r],p=l;return m?(t((0,i.Bk)(o,{tripsList:m})),Promise.resolve(m)):t((0,s.tf)({loaders:p,service:a,data:n,onRequest:function(){return t((0,i.NE)(o))},onComplete:function(e){return e.messages?t((0,i.Oo)(o,e.messages)):(u[r]=e,t((0,i.Bk)(o,{tripsList:e}))),e}}))}}var m={onSelectCrossBrandLocation:function(e){return function(t){var r=e.bookingDomainCountry,n=e.brand,i=e.confirmationNumber,a=e.firstName,o=e.lastName,s={brand:n,country:r};if("ENTERPRISE"===n.toUpperCase()){var u=c.P6.getQsFromObj({type:"VIEW_RESERVATION",confirmnum:i,firstname:a,lastname:o});Object.assign(s,{legacy:!0,qs:u})}else{var l=c.P6.getQsFromObj({stop:"viewmodifycanceldetails",confirmationNumber:i,firstName:a,lastName:o});Object.assign(s,{doSso:!1,qs:l})}return t(c.Nw.crossBrandDeepLink(s))}},getCurrentTrips:function(e){var t=e.userId,r=e.tripsLimit,i=e.usePageLoader;return l({cacheKey:"".concat(t,"|current|").concat(r||"all"),data:{tripsLimit:r},service:o.current,cursor:n.uJ.TRIPS_CURRENT,usePageLoader:i})},getUpcomingTrips:function(e){var t=e.userId,r=e.tripsLimit,i=e.usePageLoader;return l({cacheKey:"".concat(t,"|upcoming|").concat(r||"all"),data:{tripsLimit:r},service:o.upcoming,cursor:n.uJ.TRIPS_UPCOMING,usePageLoader:i})},getPastTrips:function(e){var t=e.lastName,r=e.driverLicense,i=e.membershipNumber,a=e.fromDate,s=e.toDate,c=e.usePageLoader;return l({cacheKey:"".concat(i,"|past|").concat(a,"|").concat(s),data:{membership_number:i,last_name:t,driver_license:r,from_date:a,to_date:s},service:o.past,cursor:n.uJ.TRIPS_PAST,usePageLoader:c})},getInvoiceDetails:function(e){var t=e.invoiceNumber,r=e.usePageLoader;return l({cacheKey:"invoice|".concat(t),data:{invoiceNumber:t},service:o.invoice,cursor:n.uJ.TRIPS_INVOICE,usePageLoader:r})}}},5984:function(e,t,r){var n=r(67294),i=r.n(n),a=r(81156),o=r(72734),s=r(55176),c=r(69045),u=r(32388),l=r(98899),m=r(60564),p=r(52492),d=r(93417),f=function(e){var t,r,n,f=e.trip,_=e.options,g=e.showVehicleContent,v=void 0!==g&&g,h=e.currentTrip,N=e.showPastDueMessage,b=e.detailsOpen,L=e.setDetailsOpen,P={firstName:f.firstName,lastName:f.lastName},E=v?"trip-details":"trip-summary",I=(0,d.o)(p.Z).onSelectCrossBrandLocation,w="NATIONAL"!==(null===(t=f.brand)||void 0===t?void 0:t.toUpperCase()),T=null===(r=zl.site.reservation)||void 0===r?void 0:r.national_extend_current_trip_phone_number,C=null===(n=zl.site.reservation)||void 0===n?void 0:n.enterprise_extend_current_trip_phone_number;return i().createElement(i().Fragment,null,!!h&&i().createElement(c.Z,{additionalClasses:"zl-section--padding-bottom-small"},i().createElement(u.Z,{displayAsError:N,content:[{title:(0,l.ag)(N?"past_due_extend_your_current_trip_title":"confirm_extend_your_current_trip_title"),message:(0,l.ag)("past_due_extend_your_current_trip_message",{0:i().createElement("a",{"data-dtm-track":"link.ClickToCall.original",href:"tel:".concat(w?C:T)},w?C:T)},{jsx:!0}),cta:{href:(0,l.Gr)(m.qT.MOBILE_APP_PATH),text:(0,l.ag)("confirm_extend_your_current_trip_download"),dataDmTrack:"link.DownloadAppLink.original"}}]})),i().createElement("div",{className:E},i().createElement(a.Z,{customerName:P,confirmationNumber:f.confirmationNumber,options:_,isCrossBrandReservation:w,onSelectCrossBrandLocation:function(){return I(f)}},i().createElement("strong",null,h?(0,l.ag)("confirm_rental_agreement_number_label"):(0,l.ag)("common_confirmation_number")," ","#",h?f.ticketNumber:f.confirmationNumber)),i().createElement("div",{className:"rental".concat(v&&f.vehicleDetails.reserve_the_aisle?" reserve-the-aisle":"")},v&&i().createElement(o.Z,{vehicleDetails:f.vehicleDetails}),i().createElement(s.Z,{ldt:f,deeplink:f.tripDeeplink,isCrossBrandReservation:w,onSelectCrossBrandLocation:function(){return I(f)},afterHoursDropoff:f.afterHoursDropoff,afterHoursPickup:f.afterHoursPickup,currentTrip:h,detailsOpen:b,setDetailsOpen:L,showView:_.showView}))))};f.defaultProps={options:{showView:!0}},t.Z=f},37335:function(e,t,r){r.r(t),r.d(t,{default:function(){return b}});var n=r(67294),i=r.n(n),a=r(73935),o=r.n(a),s=r(74465),c=r(52492),u=r(62518),l=r(16506),m=r(98899),p=r(70885),d=r(5984),f=r(60564),_=function(e){var t=e.trip,r=e.breakpoint,a=(0,n.useState)(""),o=(0,p.Z)(a,2),s=o[0],c=o[1],u=function(e){var t=new Date(e.returnTime._d),r=new Date;if(t.getTime()