(window.webpackJsonp=window.webpackJsonp||[]).push([[219,171],{1046:function(t,e,r){"use strict";r.r(e);r(14);var n=r(4),c=r(5),o=r(6),l=r(7),h=r(3),f=(r(117),r(1)),d=r(0);function v(t){var e=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(t){return!1}}();return function(){var r,n=Object(h.a)(t);if(e){var c=Object(h.a)(this).constructor;r=Reflect.construct(n,arguments,c)}else r=n.apply(this,arguments);return Object(l.a)(this,r)}}var y=function(t){Object(o.a)(r,t);var e=v(r);function r(){return Object(n.a)(this,r),e.apply(this,arguments)}return Object(c.a)(r,[{key:"isActive",get:function(){return this.index===this.currentTabIndex}},{key:"setTab",value:function(){this.$emit("setTab",this.index)}}]),r}(d.Vue);Object(f.a)([Object(d.Prop)(String)],y.prototype,"text",void 0),Object(f.a)([Object(d.Prop)(Number)],y.prototype,"index",void 0),Object(f.a)([Object(d.Prop)(Number)],y.prototype,"currentTabIndex",void 0),Object(f.a)([Object(d.Prop)(Number)],y.prototype,"total",void 0);var O=y=Object(f.a)([d.Component],y),j=(r(909),r(10)),component=Object(j.a)(O,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"tab",class:{"tab--active":t.isActive},on:{click:t.setTab}},[r("div",{directives:[{name:"show",rawName:"v-show",value:t.isActive,expression:"isActive"}],staticClass:"sub-headline mt-2 mt-sm-3"},[t._v("\n "+t._s(t.$t("Search.SearchPage.TabHeadline"))+"\n ")]),t._v(" "),r("div",{staticClass:"tab-headline pb-2 pb-sm-3",class:{"tab-headline--active":t.isActive}},[t._v(t._s(t.text)+" "+t._s(t.total?"("+t.total+")":void 0))])])}),[],!1,null,"321a3978",null);e.default=component.exports},1171:function(t,e,r){"use strict";r(970)},510:function(t,e,r){"use strict";r.r(e),r.d(e,"tabComponents",(function(){return O}));r(14);var n=r(4),c=r(5),o=r(6),l=r(7),h=r(3),f=r(1),d=r(0),v=r(531);function y(t){var e=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(t){return!1}}();return function(){var r,n=Object(h.a)(t);if(e){var c=Object(h.a)(this).constructor;r=Reflect.construct(n,arguments,c)}else r=n.apply(this,arguments);return Object(l.a)(this,r)}}var O={0:function(){return Promise.all([r.e(0),r.e(1),r.e(3),r.e(2),r.e(41)]).then(r.bind(null,1268))},1:function(){return r.e(39).then(r.bind(null,1266))},2:function(){return r.e(40).then(r.bind(null,1267))}},j=function(t){Object(o.a)(r,t);var e=y(r);function r(){var t;return Object(n.a)(this,r),(t=e.apply(this,arguments)).currentTabIndex=0,t}return Object(c.a)(r,[{key:"setCurrentTab",value:function(t){this.currentTabIndex=t}},{key:"currentTabComponent",get:function(){return O[this.currentTabIndex]}},{key:"componentData",get:function(){switch(this.currentTabIndex){case 0:return this.productResults.results;case 1:return this.categoryResults.results;case 2:return this.contentResults.results;default:return null}}},{key:"switchTabs",value:function(){return this.haveProducts?this.setCurrentTab(0):!this.haveProducts&&this.haveCategories?this.setCurrentTab(1):this.haveProducts||this.haveCategories||!this.haveContent?this.setCurrentTab(-1):this.setCurrentTab(2)}},{key:"mounted",value:function(){this.$store.commit("navigation/setHideMargin",!0)}},{key:"haveProducts",get:function(){return!!this.productResults.results&&!!this.productResults.results.length}},{key:"haveCategories",get:function(){return!!this.categoryResults.results&&!!this.categoryResults.results.length}},{key:"haveContent",get:function(){return!!this.contentResults.results&&!!this.contentResults.results.length}},{key:"totalProducts",get:function(){return this.productResults&&this.productResults.total?this.productResults.total:0}},{key:"totalCategories",get:function(){return this.categoryResults.results?this.categoryResults.total:0}},{key:"totalContent",get:function(){return this.contentResults.results?this.contentResults.total:0}},{key:"totalSearchResult",get:function(){return this.totalProducts+this.totalCategories+this.totalContent}}]),r}(v.a);Object(f.a)([Object(d.Getter)("search/productResults")],j.prototype,"productResults",void 0),Object(f.a)([Object(d.Getter)("search/categoryResults")],j.prototype,"categoryResults",void 0),Object(f.a)([Object(d.Getter)("search/contentResults")],j.prototype,"contentResults",void 0),Object(f.a)([Object(d.Getter)("search/searchTerm")],j.prototype,"currentSearchTerm",void 0),Object(f.a)([Object(d.Getter)("search/loading")],j.prototype,"loading",void 0),Object(f.a)([Object(d.Watch)("loading",{immediate:!0,deep:!0})],j.prototype,"switchTabs",null);var m=j=Object(f.a)([d.Component],j),R=(r(1171),r(10)),component=Object(R.a)(m,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"search-page"},[r("section",{staticClass:"top-section flex-column",class:{"d-flex justify-content-center h-50":!t.totalSearchResult||!t.currentSearchTerm}},[r("div",{staticClass:"container"},[r("transition",{attrs:{name:"fade"}},[t.currentSearchTerm?r("div",{staticClass:"top-section__title justify-content-center row pt-6"},[t._v("\n "+t._s(t.$t("Search.SearchPage.TotalSearchResults",{totalSearchResults:t.totalSearchResult}))+"\n ")]):t._e()]),t._v(" "),r("transition",{attrs:{name:"fade"}},[r("h1",{staticClass:"top-section__description"},[t._v("\n "+t._s(t.currentSearchTerm?t.$t("Search.SearchPage.SearchResults",{currentSearchTerm:t.currentSearchTerm}):t.$t("Search.SearchPage.InputSearchTerm"))+"\n ")])]),t._v(" "),t.currentSearchTerm&&t.totalSearchResult?t._e():r("div",{staticClass:"search-input d-flex mx-auto mb-10"},[r("KsSearchInput")],1)],1),t._v(" "),t.currentSearchTerm&&t.totalSearchResult?r("div",{staticClass:"container tab-container"},[t.productResults.results?r("KsSearchPageTab",{attrs:{text:this.$t("Search.Products"),total:t.productResults.total,index:0,"current-tab-index":t.currentTabIndex},on:{setTab:t.setCurrentTab}}):t._e(),t._v(" "),t.categoryResults.results?r("KsSearchPageTab",{attrs:{text:this.$t("Search.Categories"),total:t.categoryResults.total,index:1,"current-tab-index":t.currentTabIndex},on:{setTab:t.setCurrentTab}}):t._e(),t._v(" "),t.contentResults.results?r("KsSearchPageTab",{attrs:{text:this.$t("Search.Inspiration"),total:t.contentResults.total,index:2,"current-tab-index":t.currentTabIndex},on:{setTab:t.setCurrentTab}}):t._e()],1):t._e()]),t._v(" "),t.currentTabComponent&&t.totalSearchResult?r("section",{staticClass:"container"},[r(t.currentTabComponent,{tag:"component",attrs:{data:t.componentData}})],1):t._e()])}),[],!1,null,"289420aa",null);e.default=component.exports;installComponents(component,{KsSearchInput:r(273).default,KsSearchPageTab:r(1046).default})},531:function(t,e,r){"use strict";r(14);var n=r(4),c=r(5),o=r(6),l=r(7),h=r(3),f=r(1),d=r(0);function v(t){var e=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(t){return!1}}();return function(){var r,n=Object(h.a)(t);if(e){var c=Object(h.a)(this).constructor;r=Reflect.construct(n,arguments,c)}else r=n.apply(this,arguments);return Object(l.a)(this,r)}}var y=function(t){Object(o.a)(r,t);var e=v(r);function r(){return Object(n.a)(this,r),e.apply(this,arguments)}return Object(c.a)(r,[{key:"breadcrumb",get:function(){if(this.route.breadcrumb)return this.route.breadcrumb}},{key:"contentBlocks",get:function(){return this.route&&this.route.content?this.route.content.view.contentBlocksComposition.view.blocks:this.route&&this.route.contentBlocksComposition?this.route.contentBlocksComposition.view.blocks:this.route&&this.route.blocks?this.route.blocks:null}}]),r}(d.Vue);Object(f.a)([Object(d.Prop)()],y.prototype,"route",void 0),Object(f.a)([Object(d.Prop)()],y.prototype,"product",void 0),Object(f.a)([Object(d.Prop)()],y.prototype,"liveShopperEvent",void 0),Object(f.a)([Object(d.Prop)()],y.prototype,"liveShopperEventList",void 0),Object(f.a)([Object(d.Prop)()],y.prototype,"order",void 0);var O=y=Object(f.a)([d.Component],y),j=r(10),component=Object(j.a)(O,undefined,undefined,!1,null,null,null);e.a=component.exports},801:function(t,e,r){},909:function(t,e,r){"use strict";r(801)},970:function(t,e,r){}}]);