{"version":3,"sources":["webpack:///./src/views/apps/e-commerce/e-commerce-shop/ECommerceShop.vue?1d0b","webpack:///./src/views/apps/e-commerce/e-commerce-shop/ECommerceShopLeftFilterSidebar.vue?1bac","webpack:///src/views/apps/e-commerce/e-commerce-shop/ECommerceShopLeftFilterSidebar.vue","webpack:///./src/views/apps/e-commerce/e-commerce-shop/ECommerceShopLeftFilterSidebar.vue?fca4","webpack:///./src/views/apps/e-commerce/e-commerce-shop/ECommerceShopLeftFilterSidebar.vue","webpack:///./src/views/apps/e-commerce/e-commerce-shop/useECommerceShop.js","webpack:///src/views/apps/e-commerce/e-commerce-shop/ECommerceShop.vue","webpack:///./src/views/apps/e-commerce/e-commerce-shop/ECommerceShop.vue?fdf5","webpack:///./src/views/apps/e-commerce/e-commerce-shop/ECommerceShop.vue","webpack:///./src/views/apps/e-commerce/e-commerce-shop/ECommerceShopLeftFilterSidebar.vue?6147","webpack:///./src/@core/comp-functions/ui/app.js","webpack:///./src/views/apps/e-commerce/e-commerce-shop/ECommerceShopLeftFilterSidebar.vue?c674","webpack:///./src/views/apps/e-commerce/e-commerce-shop/ECommerceShop.vue?088a","webpack:///./src/views/apps/e-commerce/e-commerce-shop/ECommerceShop.vue?a869","webpack:///./src/@core/utils/utils.js","webpack:///./src/views/apps/e-commerce/useEcommerce.js"],"names":["render","_vm","this","_h","$createElement","_c","_self","staticStyle","attrs","staticClass","on","$event","mqShallShowLeftSidebar","_v","_s","totalProducts","directives","name","rawName","value","expression","modifiers","sortBy","text","_l","sortOption","key","model","callback","$$v","itemView","option","icon","filters","$set","class","product","id","params","slug","image","star","rating","price","brand","description","toggleProductInWishlist","isInWishlist","handleCartActionClick","isInCart","perPage","scopedSlots","_u","fn","proxy","filterOptions","staticRenderFns","priceRangeDefined","$store","state","appConfig","isRTL","categories","brands","count","$emit","components","BRow","BCol","BFormRadioGroup","BLink","BCard","VueSlider","props","type","Object","required","Boolean","component","useShopFiltersSortingAndPagination","ref","q","priceRange","ratings","page","sortByOptions","useShopUi","itemViewOptions","useShopRemoteData","products","fetchProducts","args","store","dispatch","Ripple","BDropdown","BDropdownItem","BFormRadio","BInputGroup","BInputGroupAppend","BFormInput","BCardBody","BImg","BCardText","BButton","BPagination","ShopLeftFilterSidebar","setup","useEcommerceUi","useResponsiveAppLeftSidebarVisibility","fetchShopProducts","then","response","data","total","watch","deep","currentBreakPoint","computed","getters","val","oldVal","isObject","obj","isToday","date","today","Date","getDate","getMonth","getFullYear","isDynamicRouteActive","route","resolvedRoute","router","resolve","path","currentRoute","useRouter","vm","getCurrentInstance","reactive","$route","r","toRefs","$router","showToast","message","Vue","$toast","ToastificationContent","title","variant","removeAccents","str","normalize","replace","useEcommerce","addProductInWishlist","productId","removeProductFromWishlist","addProductInCart","removeProductFromCart","push","commit","cartItemsCount","handleWishlistCartActionClick","removeProductFromWishlistUi"],"mappings":"yHAAA,IAAIA,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,MAAM,CAACE,YAAY,CAAC,OAAS,YAAY,CAACF,EAAG,UAAU,CAACG,MAAM,CAAC,GAAK,qBAAqB,CAACH,EAAG,MAAM,CAACI,YAAY,OAAO,CAACJ,EAAG,MAAM,CAACI,YAAY,aAAa,CAACJ,EAAG,MAAM,CAACI,YAAY,0BAA0B,CAACJ,EAAG,MAAM,CAACI,YAAY,kBAAkB,CAACJ,EAAG,eAAe,CAACI,YAAY,oBAAoBD,MAAM,CAAC,KAAO,WAAW,KAAO,MAAME,GAAG,CAAC,MAAQ,SAASC,GAAQV,EAAIW,wBAAyB,MAASP,EAAG,MAAM,CAACI,YAAY,kBAAkB,CAACR,EAAIY,GAAG,IAAIZ,EAAIa,GAAGb,EAAIc,eAAe,sBAAsB,GAAGV,EAAG,MAAM,CAACI,YAAY,uBAAuB,CAACJ,EAAG,aAAa,CAACW,WAAW,CAAC,CAACC,KAAK,SAASC,QAAQ,eAAeC,MAA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Qa,UAAW,EAGnB2C,OAAMwE,OAAO,wCAAyCxE,OAAMjC,MAAM,iBAAiB0G,eAAiB,MAKpGC,EAAgCA,CAAClI,EAASmI,KAC9C,MAAM,iBAAEN,EAAgB,0BAAED,GAA8BH,IAEpDzH,EAAQa,SACVqF,EAAO6B,KAAK,CAAElJ,KAAM,6BAEpBgJ,EAAiB7H,EAAQC,IACtB0E,KAAK,KAEJ3E,EAAQa,UAAW,EACnB+G,EAA0B5H,EAAQC,IAGlCuD,OAAMwE,OAAO,wCAAyCxE,OAAMjC,MAAM,iBAAiB0G,eAAiB,KAErGtD,KAAK,KAEJ3E,EAAQW,cAAe,EACvBwH,EAA4BnI,MAIpC,MAAO,CACLU,0BACAE,wBACAsH","file":"js/chunk-9c6a80c2.151ac8e6.js","sourcesContent":["var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticStyle:{\"height\":\"inherit\"}},[_c('section',{attrs:{\"id\":\"ecommerce-header\"}},[_c('div',{staticClass:\"row\"},[_c('div',{staticClass:\"col-sm-12\"},[_c('div',{staticClass:\"ecommerce-header-items\"},[_c('div',{staticClass:\"result-toggler\"},[_c('feather-icon',{staticClass:\"d-block d-lg-none\",attrs:{\"icon\":\"MenuIcon\",\"size\":\"21\"},on:{\"click\":function($event){_vm.mqShallShowLeftSidebar = true}}}),_c('div',{staticClass:\"search-results\"},[_vm._v(\" \"+_vm._s(_vm.totalProducts)+\" results found \")])],1),_c('div',{staticClass:\"view-options d-flex\"},[_c('b-dropdown',{directives:[{name:\"ripple\",rawName:\"v-ripple.400\",value:('rgba(113, 102, 240, 0.15)'),expression:\"'rgba(113, 102, 240, 0.15)'\",modifiers:{\"400\":true}}],attrs:{\"text\":_vm.sortBy.text,\"right\":\"\",\"variant\":\"outline-primary\"}},_vm._l((_vm.sortByOptions),function(sortOption){return _c('b-dropdown-item',{key:sortOption.value,on:{\"click\":function($event){_vm.sortBy=sortOption}}},[_vm._v(\" \"+_vm._s(sortOption.text)+\" \")])}),1),_c('b-form-radio-group',{staticClass:\"ml-1 list item-view-radio-group\",attrs:{\"buttons\":\"\",\"size\":\"sm\",\"button-variant\":\"outline-primary\"},model:{value:(_vm.itemView),callback:function ($$v) {_vm.itemView=$$v},expression:\"itemView\"}},_vm._l((_vm.itemViewOptions),function(option){return _c('b-form-radio',{key:option.value,attrs:{\"value\":option.value}},[_c('feather-icon',{attrs:{\"icon\":option.icon,\"size\":\"18\"}})],1)}),1)],1)])])])]),_c('div',{staticClass:\"body-content-overlay\"}),_c('div',{staticClass:\"ecommerce-searchbar mt-1\"},[_c('b-row',[_c('b-col',{attrs:{\"cols\":\"12\"}},[_c('b-input-group',{staticClass:\"input-group-merge\"},[_c('b-form-input',{staticClass:\"search-product\",attrs:{\"placeholder\":\"Search Product\"},model:{value:(_vm.filters.q),callback:function ($$v) {_vm.$set(_vm.filters, \"q\", $$v)},expression:\"filters.q\"}}),_c('b-input-group-append',{attrs:{\"is-text\":\"\"}},[_c('feather-icon',{staticClass:\"text-muted\",attrs:{\"icon\":\"SearchIcon\"}})],1)],1)],1)],1)],1),_c('section',{class:_vm.itemView},_vm._l((_vm.products),function(product){return _c('b-card',{key:product.id,staticClass:\"ecommerce-card\",attrs:{\"no-body\":\"\"}},[_c('div',{staticClass:\"item-img text-center\"},[_c('b-link',{attrs:{\"to\":{ name: 'apps-e-commerce-product-details', params: { slug: product.slug } }}},[_c('b-img',{staticClass:\"card-img-top\",attrs:{\"alt\":((product.name) + \"-\" + (product.id)),\"fluid\":\"\",\"src\":product.image}})],1)],1),_c('b-card-body',[_c('div',{staticClass:\"item-wrapper\"},[_c('div',{staticClass:\"item-rating\"},[_c('ul',{staticClass:\"unstyled-list list-inline\"},_vm._l((5),function(star){return _c('li',{key:star,staticClass:\"ratings-list-item\",class:{'ml-25': star-1}},[_c('feather-icon',{class:[{'fill-current': star <= product.rating}, star <= product.rating ? 'text-warning' : 'text-muted'],attrs:{\"icon\":\"StarIcon\",\"size\":\"16\"}})],1)}),0)]),_c('div',[_c('h6',{staticClass:\"item-price\"},[_vm._v(\" $\"+_vm._s(product.price)+\" \")])])]),_c('h6',{staticClass:\"item-name\"},[_c('b-link',{staticClass:\"text-body\",attrs:{\"to\":{ name: 'apps-e-commerce-product-details', params: { slug: product.slug } }}},[_vm._v(\" \"+_vm._s(product.name)+\" \")]),_c('b-card-text',{staticClass:\"item-company\"},[_vm._v(\" By \"),_c('b-link',{staticClass:\"ml-25\"},[_vm._v(\" \"+_vm._s(product.brand)+\" \")])],1)],1),_c('b-card-text',{staticClass:\"item-description\"},[_vm._v(\" \"+_vm._s(product.description)+\" \")])],1),_c('div',{staticClass:\"item-options text-center\"},[_c('div',{staticClass:\"item-wrapper\"},[_c('div',{staticClass:\"item-cost\"},[_c('h4',{staticClass:\"item-price\"},[_vm._v(\" $\"+_vm._s(product.price)+\" \")])])]),_c('b-button',{staticClass:\"btn-wishlist\",attrs:{\"variant\":\"light\",\"tag\":\"a\"},on:{\"click\":function($event){return _vm.toggleProductInWishlist(product)}}},[_c('feather-icon',{staticClass:\"mr-50\",class:{'text-danger': product.isInWishlist},attrs:{\"icon\":\"HeartIcon\"}}),_c('span',[_vm._v(\"Wishlist\")])],1),_c('b-button',{staticClass:\"btn-cart\",attrs:{\"variant\":\"primary\",\"tag\":\"a\"},on:{\"click\":function($event){return _vm.handleCartActionClick(product)}}},[_c('feather-icon',{staticClass:\"mr-50\",attrs:{\"icon\":\"ShoppingCartIcon\"}}),_c('span',[_vm._v(_vm._s(product.isInCart ? 'View In Cart' : 'Add to Cart'))])],1)],1)],1)}),1),_c('section',[_c('b-row',[_c('b-col',{attrs:{\"cols\":\"12\"}},[_c('b-pagination',{attrs:{\"total-rows\":_vm.totalProducts,\"per-page\":_vm.filters.perPage,\"first-number\":\"\",\"align\":\"center\",\"last-number\":\"\",\"prev-class\":\"prev-item\",\"next-class\":\"next-item\"},scopedSlots:_vm._u([{key:\"prev-text\",fn:function(){return [_c('feather-icon',{attrs:{\"icon\":\"ChevronLeftIcon\",\"size\":\"18\"}})]},proxy:true},{key:\"next-text\",fn:function(){return [_c('feather-icon',{attrs:{\"icon\":\"ChevronRightIcon\",\"size\":\"18\"}})]},proxy:true}]),model:{value:(_vm.filters.page),callback:function ($$v) {_vm.$set(_vm.filters, \"page\", $$v)},expression:\"filters.page\"}})],1)],1)],1),_c('portal',{attrs:{\"to\":\"content-renderer-sidebar-detached-left\"}},[_c('shop-left-filter-sidebar',{attrs:{\"filters\":_vm.filters,\"filter-options\":_vm.filterOptions,\"mq-shall-show-left-sidebar\":_vm.mqShallShowLeftSidebar},on:{\"update:mqShallShowLeftSidebar\":function($event){_vm.mqShallShowLeftSidebar=$event},\"update:mq-shall-show-left-sidebar\":function($event){_vm.mqShallShowLeftSidebar=$event}}})],1)],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"sidebar-detached sidebar-left\"},[_c('div',{staticClass:\"sidebar\"},[_c('div',{staticClass:\"sidebar-shop\",class:{'show': _vm.mqShallShowLeftSidebar}},[_c('b-row',[_c('b-col',{attrs:{\"cols\":\"12\"}},[_c('h6',{staticClass:\"filter-heading d-none d-lg-block\"},[_vm._v(\" Filters \")])])],1),_c('b-card',[_c('div',{staticClass:\"multi-range-price\"},[_c('h6',{staticClass:\"filter-title mt-0\"},[_vm._v(\" Multi Range \")]),_c('b-form-radio-group',{staticClass:\"price-range-defined-radio-group\",attrs:{\"stacked\":\"\",\"options\":_vm.filterOptions.priceRangeDefined},model:{value:(_vm.filters.priceRangeDefined),callback:function ($$v) {_vm.$set(_vm.filters, \"priceRangeDefined\", $$v)},expression:\"filters.priceRangeDefined\"}})],1),_c('div',{staticClass:\"price-slider\"},[_c('h6',{staticClass:\"filter-title\"},[_vm._v(\" Price Range \")]),_c('vue-slider',{attrs:{\"direction\":_vm.$store.state.appConfig.isRTL ? 'rtl' : 'ltr'},model:{value:(_vm.filters.priceRange),callback:function ($$v) {_vm.$set(_vm.filters, \"priceRange\", $$v)},expression:\"filters.priceRange\"}})],1),_c('div',{staticClass:\"product-categories\"},[_c('h6',{staticClass:\"filter-title\"},[_vm._v(\" Categories \")]),_c('b-form-radio-group',{staticClass:\"categories-radio-group\",attrs:{\"stacked\":\"\",\"options\":_vm.filterOptions.categories},model:{value:(_vm.filters.categories),callback:function ($$v) {_vm.$set(_vm.filters, \"categories\", $$v)},expression:\"filters.categories\"}})],1),_c('div',{staticClass:\"brands\"},[_c('h6',{staticClass:\"filter-title\"},[_vm._v(\" Brands \")]),_c('b-form-radio-group',{staticClass:\"brands-radio-group\",attrs:{\"stacked\":\"\",\"options\":_vm.filterOptions.brands},model:{value:(_vm.filters.brands),callback:function ($$v) {_vm.$set(_vm.filters, \"brands\", $$v)},expression:\"filters.brands\"}})],1),_c('div',{staticClass:\"ratings\"},[_c('h6',{staticClass:\"filter-title\"},[_vm._v(\" Ratings \")]),_vm._l((_vm.filterOptions.ratings),function(rating){return _c('div',{key:rating.rating,staticClass:\"ratings-list\"},[_c('b-link',[_c('div',{staticClass:\"d-flex\"},[_vm._l((5),function(star){return _c('feather-icon',{key:star,class:[{'fill-current': star <= rating.rating}, star <= rating.rating ? 'text-warning' : 'text-muted'],attrs:{\"icon\":\"StarIcon\",\"size\":\"17\"}})}),_c('span',{staticClass:\"ml-25\"},[_vm._v(\"& up\")])],2)]),_c('div',{staticClass:\"stars-received\"},[_c('span',[_vm._v(_vm._s(rating.count))])])],1)})],2)])],1)]),_c('div',{staticClass:\"body-content-overlay\",class:{'show': _vm.mqShallShowLeftSidebar},on:{\"click\":function($event){return _vm.$emit('update:mq-shall-show-left-sidebar', false)}}})])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\r\n\r\n\r\n\r\n\r\n\r\n\r\n","import mod from \"-!../../../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ECommerceShopLeftFilterSidebar.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ECommerceShopLeftFilterSidebar.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./ECommerceShopLeftFilterSidebar.vue?vue&type=template&id=0f9303ea&scoped=true&\"\nimport script from \"./ECommerceShopLeftFilterSidebar.vue?vue&type=script&lang=js&\"\nexport * from \"./ECommerceShopLeftFilterSidebar.vue?vue&type=script&lang=js&\"\nimport style0 from \"./ECommerceShopLeftFilterSidebar.vue?vue&type=style&index=0&id=0f9303ea&prod&lang=scss&\"\nimport style1 from \"./ECommerceShopLeftFilterSidebar.vue?vue&type=style&index=1&id=0f9303ea&prod&lang=scss&scoped=true&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"0f9303ea\",\n null\n \n)\n\nexport default component.exports","import { ref } from '@vue/composition-api'\r\nimport store from '@/store'\r\n\r\nexport const useShopFiltersSortingAndPagination = () => {\r\n const filters = ref({\r\n q: '',\r\n priceRangeDefined: 'all',\r\n priceRange: [0, 100],\r\n categories: [],\r\n brands: [],\r\n ratings: null,\r\n page: 1,\r\n perPage: 9,\r\n })\r\n\r\n const filterOptions = {\r\n priceRangeDefined: [\r\n { text: 'All', value: 'all' },\r\n { text: '<= $10', value: '<=10' },\r\n { text: '$10 - $100', value: '10-100' },\r\n { text: '$100 - $500', value: '100-500' },\r\n { text: '>= $500', value: '>=500' },\r\n ],\r\n categories: [\r\n 'Appliances',\r\n 'Audio',\r\n 'Cameras & Camcorders',\r\n 'Car Electronics & GPS',\r\n 'Cell Phones',\r\n 'Computers & Tablets',\r\n 'Health, Fitness & Beauty',\r\n 'Office & School Supplies',\r\n 'TV & Home Theater',\r\n 'Video Games',\r\n ],\r\n brands: ['Insignia™', 'Samsung', 'Metra', 'HP', 'Apple', 'GE', 'Sony', 'Incipio', 'KitchenAid', 'Whirlpool'],\r\n ratings: [\r\n { rating: 4, count: 160 },\r\n { rating: 3, count: 176 },\r\n { rating: 2, count: 291 },\r\n { rating: 1, count: 190 },\r\n ],\r\n }\r\n\r\n // Sorting\r\n const sortBy = ref({ text: 'Featured', value: 'featured' })\r\n const sortByOptions = [\r\n { text: 'Featured', value: 'featured' },\r\n { text: 'Lowest', value: 'price-asc' },\r\n { text: 'Highest', value: 'price-desc' },\r\n ]\r\n\r\n return {\r\n // Filter\r\n filters,\r\n filterOptions,\r\n\r\n // Sort\r\n sortBy,\r\n sortByOptions,\r\n }\r\n}\r\n\r\nexport const useShopUi = () => {\r\n const itemView = 'grid-view'\r\n const itemViewOptions = [\r\n { icon: 'GridIcon', value: 'grid-view' },\r\n { icon: 'ListIcon', value: 'list-view' },\r\n ]\r\n\r\n // Pagination count <= required by pagination component\r\n const totalProducts = ref(null)\r\n\r\n return {\r\n itemView,\r\n itemViewOptions,\r\n totalProducts,\r\n }\r\n}\r\n\r\nexport const useShopRemoteData = () => {\r\n const products = ref([])\r\n const fetchProducts = (...args) => store.dispatch('app-ecommerce/fetchProducts', ...args)\r\n\r\n return {\r\n products,\r\n fetchProducts,\r\n }\r\n}\r\n","\r\n\r\n\r\n\r\n\r\n\r\n\r\n","import mod from \"-!../../../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ECommerceShop.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ECommerceShop.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./ECommerceShop.vue?vue&type=template&id=15eba8c6&scoped=true&\"\nimport script from \"./ECommerceShop.vue?vue&type=script&lang=js&\"\nexport * from \"./ECommerceShop.vue?vue&type=script&lang=js&\"\nimport style0 from \"./ECommerceShop.vue?vue&type=style&index=0&id=15eba8c6&prod&lang=scss&\"\nimport style1 from \"./ECommerceShop.vue?vue&type=style&index=1&id=15eba8c6&prod&lang=scss&scoped=true&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"15eba8c6\",\n null\n \n)\n\nexport default component.exports","export * from \"-!../../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--9-oneOf-1-0!../../../../../node_modules/css-loader/dist/cjs.js??ref--9-oneOf-1-1!../../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../../node_modules/postcss-loader/src/index.js??ref--9-oneOf-1-2!../../../../../node_modules/sass-loader/dist/cjs.js??ref--9-oneOf-1-3!../../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ECommerceShopLeftFilterSidebar.vue?vue&type=style&index=1&id=0f9303ea&prod&lang=scss&scoped=true&\"","import store from '@/store'\r\nimport { ref, watch, computed } from '@vue/composition-api'\r\n\r\nexport const useResponsiveAppLeftSidebarVisibility = () => {\r\n const mqShallShowLeftSidebar = ref(false)\r\n // Close Active Sidebars and other stuff when going in large device\r\n const currentBreakPoint = computed(() => store.getters['app/currentBreakPoint'])\r\n watch(currentBreakPoint, (val, oldVal) => {\r\n // Reset chats & contacts left sidebar\r\n if (oldVal === 'md' && val === 'lg') mqShallShowLeftSidebar.value = false\r\n })\r\n\r\n return {\r\n mqShallShowLeftSidebar,\r\n }\r\n}\r\n\r\nexport const _ = {}\r\n","export * from \"-!../../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--9-oneOf-1-0!../../../../../node_modules/css-loader/dist/cjs.js??ref--9-oneOf-1-1!../../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../../node_modules/postcss-loader/src/index.js??ref--9-oneOf-1-2!../../../../../node_modules/sass-loader/dist/cjs.js??ref--9-oneOf-1-3!../../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ECommerceShopLeftFilterSidebar.vue?vue&type=style&index=0&id=0f9303ea&prod&lang=scss&\"","export * from \"-!../../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--9-oneOf-1-0!../../../../../node_modules/css-loader/dist/cjs.js??ref--9-oneOf-1-1!../../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../../node_modules/postcss-loader/src/index.js??ref--9-oneOf-1-2!../../../../../node_modules/sass-loader/dist/cjs.js??ref--9-oneOf-1-3!../../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ECommerceShop.vue?vue&type=style&index=1&id=15eba8c6&prod&lang=scss&scoped=true&\"","export * from \"-!../../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--9-oneOf-1-0!../../../../../node_modules/css-loader/dist/cjs.js??ref--9-oneOf-1-1!../../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../../node_modules/postcss-loader/src/index.js??ref--9-oneOf-1-2!../../../../../node_modules/sass-loader/dist/cjs.js??ref--9-oneOf-1-3!../../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ECommerceShop.vue?vue&type=style&index=0&id=15eba8c6&prod&lang=scss&\"","import Vue from 'vue';\r\nimport router from '@/router';\r\n// eslint-disable-next-line object-curly-newline\r\nimport {\r\n reactive,\r\n getCurrentInstance,\r\n watch,\r\n toRefs,\r\n} from '@vue/composition-api';\r\n\r\nimport ToastificationContent from '@core/components/toastification/ToastificationContent.vue';\r\n\r\nexport const isObject = (obj) => typeof obj === 'object' && obj !== null;\r\n\r\nexport const isToday = (date) => {\r\n const today = new Date();\r\n return (\r\n /* eslint-disable operator-linebreak */\r\n date.getDate() === today.getDate() &&\r\n date.getMonth() === today.getMonth() &&\r\n date.getFullYear() === today.getFullYear()\r\n /* eslint-enable */\r\n );\r\n};\r\n\r\nconst getRandomFromArray = (array) =>\r\n array[Math.floor(Math.random() * array.length)];\r\n\r\n// ? Light and Dark variant is not included\r\n// prettier-ignore\r\nexport const getRandomBsVariant = () => getRandomFromArray(['primary', 'secondary', 'success', 'warning', 'danger', 'info'])\r\n\r\nexport const isDynamicRouteActive = (route) => {\r\n const { route: resolvedRoute } = router.resolve(route);\r\n return resolvedRoute.path === router.currentRoute.path;\r\n};\r\n\r\n// Thanks: https://medium.com/better-programming/reactive-vue-routes-with-the-composition-api-18c1abd878d1\r\nexport const useRouter = () => {\r\n const vm = getCurrentInstance().proxy;\r\n const state = reactive({\r\n route: vm.$route,\r\n });\r\n\r\n watch(\r\n () => vm.$route,\r\n (r) => {\r\n state.route = r;\r\n }\r\n );\r\n\r\n return { ...toRefs(state), router: vm.$router };\r\n};\r\n\r\n/**\r\n * This is just enhancement over Object.extend [Gives deep extend]\r\n * @param {target} a Object which contains values to be overridden\r\n * @param {source} b Object which contains values to override\r\n */\r\n// export const objectExtend = (a, b) => {\r\n// // Don't touch 'null' or 'undefined' objects.\r\n// if (a == null || b == null) {\r\n// return a\r\n// }\r\n\r\n// Object.keys(b).forEach(key => {\r\n// if (Object.prototype.toString.call(b[key]) === '[object Object]') {\r\n// if (Object.prototype.toString.call(a[key]) !== '[object Object]') {\r\n// // eslint-disable-next-line no-param-reassign\r\n// a[key] = b[key]\r\n// } else {\r\n// // eslint-disable-next-line no-param-reassign\r\n// a[key] = objectExtend(a[key], b[key])\r\n// }\r\n// } else {\r\n// // eslint-disable-next-line no-param-reassign\r\n// a[key] = b[key]\r\n// }\r\n// })\r\n\r\n// return a\r\n// }\r\n\r\nexport function showToast(type, message) {\r\n if (type == 'success') {\r\n Vue.$toast({\r\n component: ToastificationContent,\r\n props: {\r\n title: message,\r\n icon: 'ez_check',\r\n variant: 'success',\r\n },\r\n });\r\n } else {\r\n Vue.$toast({\r\n component: ToastificationContent,\r\n props: {\r\n title: message,\r\n icon: 'ez_error',\r\n variant: 'danger',\r\n },\r\n });\r\n }\r\n}\r\n\r\nexport function removeAccents(str) {\r\n return str.normalize('NFD').replace(/[\\u0300-\\u036f]/g, '');\r\n}\r\n","import store from '@/store'\r\nimport { useRouter } from '@core/utils/utils'\r\n\r\nexport const useEcommerce = () => {\r\n // eslint-disable-next-line arrow-body-style\r\n const addProductInWishlist = productId => {\r\n return store.dispatch('app-ecommerce/addProductInWishlist', { productId })\r\n }\r\n\r\n // eslint-disable-next-line arrow-body-style\r\n const removeProductFromWishlist = productId => {\r\n return store.dispatch('app-ecommerce/removeProductFromWishlist', { productId })\r\n }\r\n\r\n // eslint-disable-next-line arrow-body-style\r\n const addProductInCart = productId => {\r\n return store.dispatch('app-ecommerce/addProductInCart', { productId })\r\n }\r\n\r\n // eslint-disable-next-line arrow-body-style\r\n const removeProductFromCart = productId => {\r\n return store.dispatch('app-ecommerce/removeProductFromCart', { productId })\r\n }\r\n\r\n return {\r\n addProductInWishlist,\r\n removeProductFromWishlist,\r\n addProductInCart,\r\n removeProductFromCart,\r\n }\r\n}\r\n\r\nexport const useEcommerceUi = () => {\r\n const { router } = useRouter()\r\n\r\n const toggleProductInWishlist = product => {\r\n const { addProductInWishlist, removeProductFromWishlist } = useEcommerce()\r\n if (product.isInWishlist) {\r\n removeProductFromWishlist(product.id).then(() => {\r\n // eslint-disable-next-line no-param-reassign\r\n product.isInWishlist = false\r\n })\r\n } else {\r\n addProductInWishlist(product.id).then(() => {\r\n // eslint-disable-next-line no-param-reassign\r\n product.isInWishlist = true\r\n })\r\n }\r\n }\r\n\r\n const handleCartActionClick = product => {\r\n const { addProductInCart } = useEcommerce()\r\n\r\n if (product.isInCart) {\r\n router.push({ name: 'apps-e-commerce-checkout' })\r\n } else {\r\n addProductInCart(product.id).then(() => {\r\n // eslint-disable-next-line no-param-reassign\r\n product.isInCart = true\r\n\r\n // Update cart items count\r\n store.commit('app-ecommerce/UPDATE_CART_ITEMS_COUNT', store.state['app-ecommerce'].cartItemsCount + 1)\r\n })\r\n }\r\n }\r\n\r\n const handleWishlistCartActionClick = (product, removeProductFromWishlistUi) => {\r\n const { addProductInCart, removeProductFromWishlist } = useEcommerce()\r\n\r\n if (product.isInCart) {\r\n router.push({ name: 'apps-e-commerce-checkout' })\r\n } else {\r\n addProductInCart(product.id)\r\n .then(() => {\r\n // eslint-disable-next-line no-param-reassign\r\n product.isInCart = true\r\n removeProductFromWishlist(product.id)\r\n\r\n // Update cart items count\r\n store.commit('app-ecommerce/UPDATE_CART_ITEMS_COUNT', store.state['app-ecommerce'].cartItemsCount + 1)\r\n })\r\n .then(() => {\r\n // eslint-disable-next-line no-param-reassign\r\n product.isInWishlist = false\r\n removeProductFromWishlistUi(product)\r\n })\r\n }\r\n }\r\n return {\r\n toggleProductInWishlist,\r\n handleCartActionClick,\r\n handleWishlistCartActionClick,\r\n }\r\n}\r\n"],"sourceRoot":""}