(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[264],{6192:function(e,r,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/trading-hours",function(){return t(1370)}])},7526:function(e,r,t){"use strict";t.d(r,{Z:function(){return h}});var n=t(4065),s=t(2744),o=t(4913),a=t(5485),i=t(264),c=t(1773),l=t(9231),u=t(8310),d=t(2774),p=t.n(d),f=function(e){var r=e.hasMultipleStores,t=e.storeKey,n=e.hostProps;return!1===n.isPreview?r?"//".concat(n.domain.id,"/stores/").concat(t.storeId):"//".concat(n.domain.id):"".concat(n.previewWebsiteUrl,"/restaurants/").concat(t.restaurantId,"/stores/").concat(t.storeId)},m=function(e){(0,s.Z)(t,e);var r=(0,a.Z)(t);function t(){var e;return(0,n.Z)(this,t),(e=r.apply(this,arguments)).getBackgroundImage=function(){var r=e.props.restaurantWebsiteProps.backgroundImage;return r||{id:"default-store-selector-background-image",path:c.N33.images.defaults.StoreSelectorBackgroundImage()}},e.renderImage=function(){var r=e.props.restaurantWebsiteProps.serverConfig.imgix.serverUrl;return(0,i.jsx)(u.R,{image:e.getBackgroundImage(),aspectRatio:c.oM5.vertical,serverUrl:r})},e.renderOverlay=function(){var r=e.props.restaurantWebsiteProps,t=r.serverConfig.imgix.serverUrl;return(0,i.jsx)("div",{className:"overlay",children:(0,i.jsx)(u.R,{image:r.restaurant.logo,aspectRatio:c.oM5.square,serverUrl:t})})},e.renderRestaurantStoreLocator=function(){var r=e.props.restaurantWebsiteProps,t=r.serverConfig.imgix.serverUrl,n=r.restaurant,s=e.getStoresFromStoreSelectorStoreIds(r.storeSelectorStoreIds,r.stores);return(0,i.jsxs)("div",{className:"restaurant-store-locator",children:[(0,i.jsxs)("div",{className:"info",children:[(0,i.jsx)(u.R,{image:n.logo,aspectRatio:c.oM5.square,serverUrl:t}),(0,i.jsx)("h2",{children:n.name}),(0,i.jsx)("p",{children:"SELECT A LOCATION"})]}),(0,i.jsx)("ul",{className:"stores",children:s.map((function(r){return r?e.renderStore({store:r}):null}))})]})},e.getStoresFromStoreSelectorStoreIds=function(e,r){if(!e||!e.length)return r;var t=e.reduce((function(e,t){var n=r.find((function(e){return e.id===t}));return n&&(e=(0,o.Z)(e).concat([n])),e}),[]);return t.length?t:r},e.renderStore=function(r){var t=r.store,n=e.props.restaurantWebsiteProps,s=n.hostProps,o=n.restaurant,a=f({hasMultipleStores:!0,storeKey:{restaurantId:o.id,storeId:t.id},hostProps:s});return(0,i.jsx)("li",{className:"store",children:(0,i.jsxs)("a",{className:"store-link",href:a,children:[(0,i.jsx)("p",{className:"name",children:t.name}),(0,i.jsx)("address",{children:"".concat(t.address.line1,", ").concat(t.address.suburb," ").concat(t.address.postcode)})]})},t.id)},e}return t.prototype.render=function(){var e=this.props.restaurantWebsiteProps,r=e.restaurant,t=e.serverConfig,n=e.facebookDomainVerification,s=e.customCssVersionPath;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(p(),{children:[(0,i.jsx)("title",{children:r.name}),(0,i.jsx)("link",{rel:"icon",type:"image/png",href:"".concat(t.imgix.serverUrl,"/").concat(r.logo.path,"?auto=compress&w=32&ar=1:1")}),(0,i.jsx)("meta",{name:"viewport",content:"initial-scale=1.0, width=device-width"}),n&&(0,i.jsx)("meta",{name:"facebook-domain-verification",content:n})]}),(0,i.jsxs)("div",{className:"restaurant-website-page",children:[this.renderImage(),this.renderOverlay(),this.renderRestaurantStoreLocator()]}),s&&(0,i.jsx)("link",{rel:"stylesheet",href:s})]})},t}(l.Component),h=m},5053:function(e,r,t){"use strict";t.d(r,{o:function(){return v}});var n=t(4065),s=t(2744),o=t(5485),a=t(264),i=t(9231),c=t(1773),l=t(8409),u=t(2569),d=function(e){return(0,a.jsx)("div",{className:"collection-type-schedule",children:(0,a.jsx)("ul",{className:"weekly-hours",children:c.dUp.map((function(r,t){return p((0,u.Z)((0,l.Z)({},e),{dayOfWeek:r,index:t}))}))})})},p=function(e){var r=e.store,t=e.weeklyHours,n=e.dayOfWeek,s=e.index,o=t[n];return(0,a.jsxs)("li",{className:"daily-hours",children:[(0,a.jsx)("span",{className:"day-of-week",children:c.IHq[n]}),(0,a.jsx)("ul",{className:"day-intervals",children:f({store:r,dailyHours:o})})]},s)},f=function(e){var r=e.store,t=e.dailyHours,n=t.dayIntervals,s=t.availableAllDay;return s||!!n.length?s?(0,a.jsx)("li",{className:"day-interval",children:"All Day"}):(0,a.jsx)(a.Fragment,{children:n.map((function(e,t){var n=e.startTimeOfDay,s=e.endTimeOfDay,o=c.FwW.fromTimeOfDay({timeOfDay:n,timezone:r.timezone}),i=c.FwW.fromTimeOfDay({timeOfDay:s,timezone:r.timezone});return(0,a.jsx)("li",{className:"day-interval",children:"".concat(o," - ").concat(i)},t)}))}):(0,a.jsx)("li",{className:"day-interval",children:"Closed"})},m=t(1762),h=function(e){var r=e.store,t=e.storeTradingHours,n=e.tableBookingSettings,s=c.nxX.filter((function(e){return(0,c.puT)({collectionType:e,store:r,tableBookingSettings:n})}));if(!s.length)return null;var o=(0,i.useState)(s[0]),l=o[0],u=o[1],p=t[l];return(0,a.jsx)("section",{className:"section trading-hours",children:(0,a.jsxs)("div",{className:"content",children:[(0,a.jsx)("h1",{className:"page-title",children:"Trading Hours"}),(0,a.jsx)(m.V,{selectedCollectionType:l,onSelectCollectionType:u,availableCollectionTypes:s}),(0,a.jsx)(d,{store:r,weeklyHours:p})]})})},v=function(e){(0,s.Z)(t,e);var r=(0,o.Z)(t);function t(){return(0,n.Z)(this,t),r.apply(this,arguments)}var i=t.prototype;return i.storeWebsiteProps=function(){return this.props.storeWebsiteProps},i.getAdditionalClassNames=function(){return"trading-hours-page"},i.renderBody=function(){var e=this.props.storeWebsiteProps;return(0,a.jsx)(h,{store:e.store,storeTradingHours:e.storeTradingHours,tableBookingSettings:e.tableBookingSettings})},t}(t(3392).u)},1370:function(e,r,t){"use strict";t.r(r),t.d(r,{__N_SSP:function(){return c},default:function(){return l}});var n=t(264),s=t(5947),o=t(2431),a=t(7526),i=t(5053),c=!0;function l(e){switch(e.type){case s.q.restaurant:return(0,n.jsx)(a.Z,{restaurantWebsiteProps:e});case s.q.store:return(0,n.jsx)(i.o,{storeWebsiteProps:e});case s.q.error:return(0,n.jsx)(o.Z,{errorWebsiteProps:e});default:throw new Error("Unhandled type.")}}},1762:function(e,r,t){"use strict";t.d(r,{V:function(){return o}});var n=t(264),s=t(1773),o=(t(9231),function(e){var r=e.selectedCollectionType,t=e.availableCollectionTypes,o=e.onSelectCollectionType;return(0,n.jsx)("ul",{className:"collection-types",children:t.map((function(e,t){return(0,n.jsx)("li",{className:e,children:(0,n.jsx)("button",{onClick:function(){return o(e)},className:"button collection-type-button ".concat(r===e?"selected":""),children:s.XTd[e]})},t)}))})})}},function(e){e.O(0,[452,381,154,541,392,774,888,179],(function(){return r=6192,e(e.s=r);var r}));var r=e.O();_N_E=r}]);