"use strict";(("undefined"!=typeof self?self:this).webpackChunkroomstay=("undefined"!=typeof self?self:this).webpackChunkroomstay||[]).push([[972],{31972:function(e,t,n){n.d(t,{Z:function(){return b}});var r=n(4942),o=n(70885),c=n(93316),i=n(67294),s=n(73460),a=n(26793),l=n(79478),u=n(78029),f=n(84544);function p(){var e=(0,a.$)().t,t=(0,i.useContext)(c.hy);return i.createElement(u.Z,{text:e(l.W.Step.Room.NextStep),disabled:!t.getAllValidRows().length,onClick:function(){return new Promise((function(e){f.ZP.instance.sendInteraction("Next Step",f.s_.BUTTON,f._J.ROOMS),t.clearSelectedRates(),e(!0)}))},wideByDefault:!0})}var m=n(3933),y=n(10513),d=n(90292);function O(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function h(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?O(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):O(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function b(){var e=(0,i.useContext)(c.g7),t=(0,i.useContext)(c.hy),n=(0,i.useState)({top:0}),r=(0,o.Z)(n,2),a=r[0],l=r[1],u=(0,s.Z)(),f=(0,o.Z)(u,2),O=f[0],b=f[1];return(0,i.useEffect)((function(){var e=window.innerHeight,t=b.height;l(e<t?{top:-(t-e+40)}:{top:150})}),[b]),(0,i.useMemo)((function(){return i.createElement("div",{ref:O,style:h({position:"sticky"},a)},!!t.getAllValidRows().length&&i.createElement("div",{className:"u-marg-bottom--heavy"},i.createElement(p,null)),e.screenSize>d.Z.Medium&&i.createElement(m.v,null),i.createElement("div",{className:"u-marg-top--heavy"},i.createElement(p,null)),e.screenSize>d.Z.Medium&&i.createElement("div",{className:"u-marg-top--heavy"},i.createElement(y.Z,null)))}),[e.screenSize,a.top])}}}]);