@roomstay/frontend 2.6.54 → 2.6.55
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/978.bundle.js +1 -1
- package/dist/main.bundle.js +1 -1
- package/dist/src/components/steps/addons/AddonCard.js +12 -6
- package/dist/src/components/steps/addons/AddonCard.js.map +1 -1
- package/dist/src/contexts/BasketContext/BasketContextWrapper.js +8 -0
- package/dist/src/contexts/BasketContext/BasketContextWrapper.js.map +1 -1
- package/dist/src/contexts/Members/AuthenticationContext/AuthenticationContextProvider.js +1 -0
- package/dist/src/contexts/Members/AuthenticationContext/AuthenticationContextProvider.js.map +1 -1
- package/dist/src/models/Addon/Addon.d.ts +2 -0
- package/dist/src/models/Addon/Addon.js +3 -0
- package/dist/src/models/Addon/Addon.js.map +1 -1
- package/dist/src/translations/Translation.d.ts +1 -0
- package/dist/src/translations/Translation.js +1 -0
- package/dist/src/translations/Translation.js.map +1 -1
- package/dist/src/translations/languages/en-gb.js +1 -0
- package/dist/src/translations/languages/en-gb.js.map +1 -1
- package/dist/test.bundle.js +1 -1
- package/package.json +1 -1
package/dist/978.bundle.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(("undefined"!=typeof self?self:this).webpackChunkroomstay=("undefined"!=typeof self?self:this).webpackChunkroomstay||[]).push([[978],{26712:function(e,t,l){l.d(t,{e:function(){return u}});var n=l(15671),a=l(43144),i=l(60136),r=l(82963),c=l(61120);var u=function(e){(0,i.Z)(o,e);var t,l,u=(t=o,l=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,n=(0,c.Z)(t);if(l){var a=(0,c.Z)(this).constructor;e=Reflect.construct(n,arguments,a)}else e=n.apply(this,arguments);return(0,r.Z)(this,e)});function o(e){var t;return(0,n.Z)(this,o),(t=u.call(this)).basketRows=void 0,t.basketRows=e,t}return(0,a.Z)(o,null,[{key:"getLabel",value:function(){return"View/Addon"}}]),o}(l(97112).x)},19370:function(e,t,l){l.r(t),l.d(t,{default:function(){return V}});var n=l(20552),a=l(26712),i=l(67294),r=l(26793),c=l(89250),u=l(79655),o=l(79478),m=l(13821),d=l(13010),s=l(46409),f=l(19874),g=l(47304),v=l(70885),E=l(89331),h=l(21120),y=l(7832),p=l(94184),N=l.n(p),P=l(97754),b=function(e){return i.createElement("div",{className:e.className},i.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i.createElement("rect",{width:"24",height:"24",rx:"12",fill:P.Il.Accent}),i.createElement("path",{d:"M7.33333 12L10.6667 15.3333L16.6667 9.33332L15.7267 8.38666L10.6667 13.4467L8.27333 11.06L7.33333 12Z",fill:"white"})))},x=l(64854),Z=l(20858),S=l(16380),w=l(63351),A=l(30584),C=l(99366),R=l(44744),_=function(e){var t,l,a=e.addon,c=e.className,u=(0,r.$)().t,m=(0,E.WP)().hotel,s=i.useContext(n.hy),f=s.getRowForAddon(a),g=(0,i.useState)(1),h=(0,v.Z)(g,2),y=h[0],p=h[1],_=(0,i.useState)(f?f.getAdultQuantity():1),k=(0,v.Z)(_,2),I=k[0],T=k[1],D=(0,i.useState)(f?f.getChildQuantity():0),O=(0,v.Z)(D,2),W=O[0],G=O[1],M=(0,i.useState)({quantity:1}),V=(0,v.Z)(M,2),H=V[0],Q=V[1],z=(0,i.useState)(f?f.getSelectedDate():""),L=(0,v.Z)(z,2),F=L[0],U=L[1],q=(0,i.useState)(f?f.getSelectedTime():""),Y=(0,v.Z)(q,2),B=Y[0],j=Y[1];(0,i.useEffect)((function(){var e,t,l,n,i,r,c;f?(Q(null!==(e=a.availability[f.getSelectedDate()])&&void 0!==e?e:a.availability[a.firstDate]),U(null!==(t=f.getSelectedDate())&&void 0!==t?t:a.firstDate),j(null!==(l=f.getSelectedTime())&&void 0!==l?l:""),p(f.getQuantity()),T(f.getAdultQuantity()),G(f.getChildQuantity())):(Q(null!==(n=a.availability[a.firstDate])&&void 0!==n?n:[]),U(a.firstDate),j((null===(i=a.availability[a.firstDate])||void 0===i||null===(r=i.selectorTimes)||void 0===r||null===(c=r[0])||void 0===c?void 0:c.value)||""))}),[]);var $=N()({"--active":!!s.getRowForAddon(a)}),J=[{name:"Date",enabled:(null==f||null===(t=f.getNumberOfAvailableNights)||void 0===t?void 0:t.call(f))>1&&!(null!=f&&f.getAddon().hideDatePicker),element:i.createElement(w.P,{nativeOnMobile:!0,options:a.selectorDates,value:F,onChange:function(e){var t,l,n,i;t=e,Q(a.availability[t]),U(t),j((null===(l=a.availability[t])||void 0===l||null===(n=l.selectorTimes)||void 0===n||null===(i=n[0])||void 0===i?void 0:i.value)||""),a.availability[t].quantity<y&&p(a.availability[t].quantity)},keyName:"value",labelName:"text",className:"u-flex align-items-center"})},{name:"Time",enabled:0!==(null==H||null===(l=H.selectorTimes)||void 0===l?void 0:l.length),element:i.createElement(w.P,{nativeOnMobile:!0,options:(null==H?void 0:H.selectorTimes)||[],value:B,onChange:function(e){j(e)},keyName:"value",labelName:"text",className:"u-flex align-items-center"})},{name:o.W.Step.Addon.Quantity,enabled:(null==H?void 0:H.price)&&(null==H?void 0:H.quantity)>1,element:i.createElement(S.Z,{number:y,min:1,max:H.quantity,onChange:function(e){p(e)}})},{name:o.W.Step.Date.Adult_plural,enabled:null==H?void 0:H.adultPrice,element:i.createElement(S.Z,{number:I,min:0,max:H.quantity-W,onChange:function(e){T(e)}})},{name:o.W.Step.Date.Child_plural,enabled:null==H?void 0:H.childPrice,element:i.createElement(S.Z,{number:W,min:0,max:H.quantity-I,onChange:function(e){G(e)}})}],K=function(){switch(a.pricingType){case C.VO.PER_STAY:return u(o.W.Misc.QTY);case C.VO.PER_PERSON:return u(o.W.Misc.Person);case C.VO.PER_PERSON_OCCUPANCY_PER_NIGHT:case C.VO.PER_PERSON_PER_NIGHT:return u(o.W.Misc.PersonPerNight);case C.VO.PER_ADULT_OCCUPANCY_PER_NIGHT:case C.VO.PER_CHILD_OCCUPANCY_PER_NIGHT:return u(o.W.Misc.AdultPerNight);case C.VO.PER_NIGHT:case C.VO.PER_QUANTITY_NAME_PER_NIGHT:return u(o.W.Misc.Night);case C.VO.PER_ROOM_QUANTITY_PER_NIGHT:return u(o.W.Misc.PerRoomDay)}}(),X={};return a.image?X.backgroundImage="url('".concat(R.Z.resizeImage(a.image,R.h.Original),"')"):(X.backgroundImage="url('".concat((null==m?void 0:m.logo)&&R.Z.resizeImage(null==m?void 0:m.logo,R.h.Original),"')"),X.backgroundSize="50%",X.backgroundRepeat="no-repeat"),i.createElement("div",{className:N()("u-flex u-flex-flex-start u-rounded addon-card-wrapper",c,$),style:{backgroundColor:P.Il.White}},i.createElement("div",{className:"addon-card-image",style:X}),i.createElement("div",{className:"u-marg-heavy u-marg@m- u-w-100@xl"},i.createElement("div",{className:"u-flex"},i.createElement(d.Z,{bold:!0},a.name),f?i.createElement(b,null):i.createElement(i.Fragment,null)),i.createElement(A.ZP,{color:P.Il.DarkGrey,type:A.yG.Small},a.description),i.createElement("div",{className:"addon-card-wrapper--price u-flex u-flex-align-flex-end"},i.createElement("div",{className:"u-w-100"},J.map((function(e){if(e.enabled)return i.createElement("div",{key:e.name,className:"u-flex justify-content-start u-marg-bot u-marg-top"},i.createElement(A.ZP,{className:"u-mw-100",bold:!0},u(e.name)),e.element)}))),i.createElement("div",{className:"addon-card-wrapper--price-action"},i.createElement("div",{className:"u-flex u-flex-direction-column u-flex-align-flex-end",style:{alignSelf:"flex-end"}},i.createElement(A.ZP,{type:A.yG.Small,color:P.Il.Navy,inline:!0},u(o.W.Misc.From)),i.createElement("div",{className:"room-details--content-price flex-align-items-baseline flex-row"},(null==H?void 0:H.price)&&i.createElement(i.Fragment,null,i.createElement("div",{className:"u-flex align-items-end"},i.createElement(d.Z,{size:"large",bold:!0,lineHeight:"1em"},i.createElement(Z.Z,{hideDecimals:!0},H.price)),i.createElement(A.ZP,{type:A.yG.Small,color:P.Il.DarkGrey,inline:!0,className:"u-marg-left--light u-clear-font-weight"},"/ ",K))),(!(null==H||!H.adultPrice)||!(null==H||!H.childPrice))&&i.createElement("h2",{className:"u-marg-none d-flex flex-wrap justify-content-end"},!!H.adultPrice&&i.createElement("div",{className:"d-flex align-items-end flex-row"},i.createElement(d.Z,{size:"large",bold:!0,lineHeight:"1em"},i.createElement(Z.Z,null,H.adultPrice)),i.createElement(A.ZP,{type:A.yG.Small,color:P.Il.DarkGrey,inline:!0,className:"u-marg-left--light u-clear-font-weight"},"/ ",u(o.W.Step.Date.Adult))),!!H.adultPrice&&!!H.childPrice&&i.createElement("br",null),!!H.childPrice&&i.createElement("div",{className:"d-flex align-items-end flex-row"},i.createElement(d.Z,{size:"large",bold:!0,lineHeight:"1em"},i.createElement(Z.Z,null,H.childPrice)),i.createElement(A.ZP,{type:A.yG.Small,color:P.Il.DarkGrey,inline:!0,className:"u-marg-left--light u-clear-font-weight"},"/ ",u(o.W.Step.Date.Child))))),i.createElement("div",{className:"u-marg-bottom--light"},i.createElement(A.ZP,{type:A.yG.Small,color:P.Il.Grey,inline:!0,className:"u-nowrap"},null!=m&&m.enableCreditCardSurcharge?u(o.W.Step.Addon.ExcludingFees):u(o.W.Step.Addon.IncludingFeesAndTaxes)))),i.createElement("div",{className:"u-marg-top--light u-flex justify-content-end u-w-100@l- flex-column flex-lg-row"},f?i.createElement("div",{className:"u-marg-right--light@l u-marg-bottom--light@l-"},i.createElement(x.Z,{onClick:function(){var e=s.basketAddonRows.find((function(e){return e.getAddon().code===a.code}));e&&s.removeBasketAddonRow(e)},textColor:P.Il.White,backgroundColor:P.Il.Navy,wide:!0},u(o.W.Step.Addon.Remove))):i.createElement(i.Fragment,null),i.createElement(x.Z,{onClick:function(){s.setAddonQuantities(a,{quantity:y,adult:I,child:W},F,B)},primary:!0,filled:!0,wide:!0},u(f?o.W.Step.Addon.UpdateCart:o.W.Step.Addon.AddToCart)))))))},k=l(62734),I=l(31972),T=function(){var e=(0,i.useContext)(n.hy),t=(0,i.useContext)(n.Qm),l=(0,E.WP)().hotel,a=e.getAllValidRows(),r=(0,i.useState)(null),c=(0,v.Z)(r,2),u=c[0],o=c[1],m=(0,i.useState)(!1),d=(0,v.Z)(m,2),f=d[0],g=d[1];return i.useEffect((function(){g(!0),h.Z.Addons.findAddons(a,null==l?void 0:l.hotelID).then((function(e){g(!1),o(e)}))}),[t.currentLanguage]),i.createElement("div",{className:"u-flex"},i.createElement(s.i5,null,i.createElement(s.mV,null,f?i.createElement(y.Z,null):null!=u&&u.length?u.map((function(e,t){return i.createElement(_,{key:t,className:"u-marg-bottom",addon:e})})):i.createElement(k.Z,null)),i.createElement(s.f,null,i.createElement(I.Z,null))))},D=l(38279),O=l(40370),W=l(16337),G=l(90292),M=l(95692);function V(){var e=(0,i.useContext)(n.g7),t=(0,i.useContext)(n.aN).currentStep,l=(0,i.useContext)(n.hy).currentBasketRows,v=(0,c.TH)(),E=(0,r.$)().t,h=(0,W.z)().raise;return(0,i.useEffect)((function(){var e=new a.e(l);h(e)}),[]),i.createElement("div",{className:"container"},i.createElement(g.V,{step:"Addon"}),i.createElement(O.default,null),i.createElement(s.i5,null,i.createElement(s.mV,null,e.screenSize>G.Z.Medium&&i.createElement(i.Fragment,null,i.createElement(u.rU,{to:{pathname:M.Z.getPreviousStepUrl(t),search:v.search}},i.createElement(m.Z,null)),i.createElement("div",{className:"u-marg-top--light u-marg-bottom--heavy"},i.createElement(d.Z,{bold:!0},E(o.W.Navigation.Steps.Addon))))),e.screenSize>G.Z.Medium&&i.createElement(s.f,null,i.createElement(D.Z,null))),e.screenSize>G.Z.Medium&&i.createElement(f.Z,null),i.createElement(T,null))}}}]);
|
|
1
|
+
"use strict";(("undefined"!=typeof self?self:this).webpackChunkroomstay=("undefined"!=typeof self?self:this).webpackChunkroomstay||[]).push([[978],{26712:function(e,t,l){l.d(t,{e:function(){return u}});var n=l(15671),a=l(43144),i=l(60136),r=l(82963),c=l(61120);var u=function(e){(0,i.Z)(o,e);var t,l,u=(t=o,l=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,n=(0,c.Z)(t);if(l){var a=(0,c.Z)(this).constructor;e=Reflect.construct(n,arguments,a)}else e=n.apply(this,arguments);return(0,r.Z)(this,e)});function o(e){var t;return(0,n.Z)(this,o),(t=u.call(this)).basketRows=void 0,t.basketRows=e,t}return(0,a.Z)(o,null,[{key:"getLabel",value:function(){return"View/Addon"}}]),o}(l(97112).x)},19370:function(e,t,l){l.r(t),l.d(t,{default:function(){return V}});var n=l(20552),a=l(26712),i=l(67294),r=l(26793),c=l(89250),u=l(79655),o=l(79478),m=l(13821),d=l(13010),s=l(46409),g=l(19874),f=l(47304),E=l(70885),v=l(89331),h=l(21120),p=l(7832),y=l(94184),N=l.n(y),P=l(97754),S=function(e){return i.createElement("div",{className:e.className},i.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i.createElement("rect",{width:"24",height:"24",rx:"12",fill:P.Il.Accent}),i.createElement("path",{d:"M7.33333 12L10.6667 15.3333L16.6667 9.33332L15.7267 8.38666L10.6667 13.4467L8.27333 11.06L7.33333 12Z",fill:"white"})))},R=l(64854),b=l(20858),x=l(16380),Z=l(63351),_=l(30584),A=l(99366),w=l(44744),C=function(e){var t,l,a=e.addon,c=e.className,u=(0,r.$)().t,m=(0,v.WP)().hotel,s=i.useContext(n.hy),g=s.getRowForAddon(a),f=(0,i.useState)(1),h=(0,E.Z)(f,2),p=h[0],y=h[1],C=(0,i.useState)(g?g.getAdultQuantity():1),O=(0,E.Z)(C,2),T=O[0],I=O[1],k=(0,i.useState)(g?g.getChildQuantity():0),D=(0,E.Z)(k,2),W=D[0],G=D[1],L=(0,i.useState)({quantity:1}),V=(0,E.Z)(L,2),M=V[0],H=V[1],Q=(0,i.useState)(g?g.getSelectedDate():""),z=(0,E.Z)(Q,2),F=z[0],U=z[1],q=(0,i.useState)(g?g.getSelectedTime():""),Y=(0,E.Z)(q,2),B=Y[0],j=Y[1];(0,i.useEffect)((function(){var e,t,l,n,i,r,c;g?(H(null!==(e=a.availability[g.getSelectedDate()])&&void 0!==e?e:a.availability[a.firstDate]),U(null!==(t=g.getSelectedDate())&&void 0!==t?t:a.firstDate),j(null!==(l=g.getSelectedTime())&&void 0!==l?l:""),y(g.getQuantity()),I(g.getAdultQuantity()),G(g.getChildQuantity())):(H(null!==(n=a.availability[a.firstDate])&&void 0!==n?n:[]),U(a.firstDate),j((null===(i=a.availability[a.firstDate])||void 0===i||null===(r=i.selectorTimes)||void 0===r||null===(c=r[0])||void 0===c?void 0:c.value)||""))}),[]);var $=N()({"--active":!!s.getRowForAddon(a)}),J=[{name:"Date",enabled:(null==g||null===(t=g.getNumberOfAvailableNights)||void 0===t?void 0:t.call(g))>1&&!(null!=g&&g.getAddon().hideDatePicker),element:i.createElement(Z.P,{nativeOnMobile:!0,options:a.selectorDates,value:F,onChange:function(e){var t,l,n,i;t=e,H(a.availability[t]),U(t),j((null===(l=a.availability[t])||void 0===l||null===(n=l.selectorTimes)||void 0===n||null===(i=n[0])||void 0===i?void 0:i.value)||""),a.availability[t].quantity<p&&y(a.availability[t].quantity)},keyName:"value",labelName:"text",className:"u-flex align-items-center"})},{name:"Time",enabled:0!==(null==M||null===(l=M.selectorTimes)||void 0===l?void 0:l.length),element:i.createElement(Z.P,{nativeOnMobile:!0,options:(null==M?void 0:M.selectorTimes)||[],value:B,onChange:function(e){j(e)},keyName:"value",labelName:"text",className:"u-flex align-items-center"})},{name:o.W.Step.Addon.Quantity,enabled:(null==M?void 0:M.price)&&(null==M?void 0:M.quantity)>1,element:i.createElement(x.Z,{number:p,min:1,max:M.quantity,onChange:function(e){y(e)}})},{name:o.W.Step.Date.Adult_plural,enabled:(null==M?void 0:M.adultPrice)&&a.pricingType!==A.VO.PER_ALL_PERSONS&&a.pricingType!==A.VO.PER_ALL_PERSONS_PER_NIGHT,element:i.createElement(x.Z,{number:T,min:0,max:M.quantity-W,onChange:function(e){I(e)}})},{name:o.W.Step.Date.Child_plural,enabled:(null==M?void 0:M.childPrice)&&a.pricingType!==A.VO.PER_ALL_PERSONS&&a.pricingType!==A.VO.PER_ALL_PERSONS_PER_NIGHT,element:i.createElement(x.Z,{number:W,min:0,max:M.quantity-T,onChange:function(e){G(e)}})}],K=function(){switch(a.pricingType){case A.VO.PER_STAY:return u(o.W.Misc.QTY);case A.VO.PER_PERSON:return u(o.W.Misc.Person);case A.VO.PER_PERSON_OCCUPANCY_PER_NIGHT:case A.VO.PER_PERSON_PER_NIGHT:return u(o.W.Misc.PersonPerNight);case A.VO.PER_ADULT_OCCUPANCY_PER_NIGHT:case A.VO.PER_CHILD_OCCUPANCY_PER_NIGHT:return u(o.W.Misc.AdultPerNight);case A.VO.PER_NIGHT:case A.VO.PER_QUANTITY_NAME_PER_NIGHT:return u(o.W.Misc.Night);case A.VO.PER_ROOM_QUANTITY_PER_NIGHT:return u(o.W.Misc.PerRoomDay)}}(),X={};return a.image?X.backgroundImage="url('".concat(w.Z.resizeImage(a.image,w.h.Original),"')"):(X.backgroundImage="url('".concat((null==m?void 0:m.logo)&&w.Z.resizeImage(null==m?void 0:m.logo,w.h.Original),"')"),X.backgroundSize="50%",X.backgroundRepeat="no-repeat"),i.createElement("div",{className:N()("u-flex u-flex-flex-start u-rounded addon-card-wrapper",c,$),style:{backgroundColor:P.Il.White}},i.createElement("div",{className:"addon-card-image",style:X}),i.createElement("div",{className:"u-marg-heavy u-marg@m- u-w-100@xl"},i.createElement("div",{className:"u-flex"},i.createElement(d.Z,{bold:!0},a.name),g?i.createElement(S,null):i.createElement(i.Fragment,null)),i.createElement(_.ZP,{color:P.Il.DarkGrey,type:_.yG.Small},a.description),i.createElement("div",{className:"addon-card-wrapper--price u-flex u-flex-align-flex-end"},i.createElement("div",{className:"u-w-100"},J.map((function(e){if(e.enabled)return i.createElement("div",{key:e.name,className:"u-flex justify-content-start u-marg-bot u-marg-top"},i.createElement(_.ZP,{className:"u-mw-100",bold:!0},u(e.name)),e.element)}))),i.createElement("div",{className:"addon-card-wrapper--price-action"},i.createElement("div",{className:"u-flex u-flex-direction-column u-flex-align-flex-end",style:{alignSelf:"flex-end"}},i.createElement(_.ZP,{type:_.yG.Small,color:P.Il.Navy,inline:!0},u(o.W.Misc.From)),i.createElement("div",{className:"room-details--content-price flex-align-items-baseline flex-row"},(null==M?void 0:M.price)&&i.createElement(i.Fragment,null,i.createElement("div",{className:"u-flex align-items-end"},i.createElement(d.Z,{size:"large",bold:!0,lineHeight:"1em"},i.createElement(b.Z,{hideDecimals:!0},M.price)),i.createElement(_.ZP,{type:_.yG.Small,color:P.Il.DarkGrey,inline:!0,className:"u-marg-left--light u-clear-font-weight"},"/ ",K))),(!(null==M||!M.adultPrice)||!(null==M||!M.childPrice))&&i.createElement("h2",{className:"u-marg-none d-flex flex-wrap justify-content-end"},!!M.adultPrice&&i.createElement("div",{className:"d-flex align-items-end flex-row"},i.createElement(d.Z,{size:"large",bold:!0,lineHeight:"1em"},i.createElement(b.Z,null,M.adultPrice)),i.createElement(_.ZP,{type:_.yG.Small,color:P.Il.DarkGrey,inline:!0,className:"u-marg-left--light u-clear-font-weight"},"/"," ",a.pricingType===A.VO.PER_ALL_PERSONS_PER_NIGHT?u(o.W.Misc.AdultPerNight):u(o.W.Step.Date.Adult))),!!M.adultPrice&&!!M.childPrice&&i.createElement("br",null),!!M.childPrice&&i.createElement("div",{className:"d-flex align-items-end flex-row"},i.createElement(d.Z,{size:"large",bold:!0,lineHeight:"1em"},i.createElement(b.Z,null,M.childPrice)),i.createElement(_.ZP,{type:_.yG.Small,color:P.Il.DarkGrey,inline:!0,className:"u-marg-left--light u-clear-font-weight"},"/"," ",a.pricingType===A.VO.PER_ALL_PERSONS_PER_NIGHT?u(o.W.Misc.ChildPerNight):u(o.W.Step.Date.Child))))),i.createElement("div",{className:"u-marg-bottom--light"},i.createElement(_.ZP,{type:_.yG.Small,color:P.Il.Grey,inline:!0,className:"u-nowrap"},null!=m&&m.enableCreditCardSurcharge?u(o.W.Step.Addon.ExcludingFees):u(o.W.Step.Addon.IncludingFeesAndTaxes)))),i.createElement("div",{className:"u-marg-top--light u-flex justify-content-end u-w-100@l- flex-column flex-lg-row"},g?i.createElement("div",{className:"u-marg-right--light@l u-marg-bottom--light@l-"},i.createElement(R.Z,{onClick:function(){var e=s.basketAddonRows.find((function(e){return e.getAddon().code===a.code}));e&&s.removeBasketAddonRow(e)},textColor:P.Il.White,backgroundColor:P.Il.Navy,wide:!0},u(o.W.Step.Addon.Remove))):i.createElement(i.Fragment,null),i.createElement(R.Z,{onClick:function(){s.setAddonQuantities(a,{quantity:p,adult:T,child:W},F,B)},primary:!0,filled:!0,wide:!0},u(g?o.W.Step.Addon.UpdateCart:o.W.Step.Addon.AddToCart)))))))},O=l(62734),T=l(31972),I=function(){var e=(0,i.useContext)(n.hy),t=(0,i.useContext)(n.Qm),l=(0,v.WP)().hotel,a=e.getAllValidRows(),r=(0,i.useState)(null),c=(0,E.Z)(r,2),u=c[0],o=c[1],m=(0,i.useState)(!1),d=(0,E.Z)(m,2),g=d[0],f=d[1];return i.useEffect((function(){f(!0),h.Z.Addons.findAddons(a,null==l?void 0:l.hotelID).then((function(e){f(!1),o(e)}))}),[t.currentLanguage]),i.createElement("div",{className:"u-flex"},i.createElement(s.i5,null,i.createElement(s.mV,null,g?i.createElement(p.Z,null):null!=u&&u.length?u.map((function(e,t){return i.createElement(C,{key:t,className:"u-marg-bottom",addon:e})})):i.createElement(O.Z,null)),i.createElement(s.f,null,i.createElement(T.Z,null))))},k=l(38279),D=l(40370),W=l(16337),G=l(90292),L=l(95692);function V(){var e=(0,i.useContext)(n.g7),t=(0,i.useContext)(n.aN).currentStep,l=(0,i.useContext)(n.hy).currentBasketRows,E=(0,c.TH)(),v=(0,r.$)().t,h=(0,W.z)().raise;return(0,i.useEffect)((function(){var e=new a.e(l);h(e)}),[]),i.createElement("div",{className:"container"},i.createElement(f.V,{step:"Addon"}),i.createElement(D.default,null),i.createElement(s.i5,null,i.createElement(s.mV,null,e.screenSize>G.Z.Medium&&i.createElement(i.Fragment,null,i.createElement(u.rU,{to:{pathname:L.Z.getPreviousStepUrl(t),search:E.search}},i.createElement(m.Z,null)),i.createElement("div",{className:"u-marg-top--light u-marg-bottom--heavy"},i.createElement(d.Z,{bold:!0},v(o.W.Navigation.Steps.Addon))))),e.screenSize>G.Z.Medium&&i.createElement(s.f,null,i.createElement(k.Z,null))),e.screenSize>G.Z.Medium&&i.createElement(g.Z,null),i.createElement(I,null))}}}]);
|