{"version":3,"sources":["webpack:///./src/components/Categories.vue","webpack:///./src/components/Categories.vue?e2a7","webpack:///./src/views/Articles.vue","webpack:///./src/views/Articles.vue?cbc7","webpack:///./src/views/Articles.vue?1aa3"],"names":["_hoisted_1","class","_hoisted_3","_createElementVNode","xmlns","role","preserveAspectRatio","focusable","width","height","fill","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","_hoisted_10","_defineComponent","__name","props","excludeIds","type","Array","default","setup","__props","rootStore","useRootStore","categories","computed","length","filter","category","includes","id","_ctx","_cache","_component_router_link","_resolveComponent","_openBlock","_createElementBlock","_unref","isLoading","_Fragment","key","_renderList","index","_createVNode","to","path","urlSlug","custom","_withCtx","navigate","onClick","_withModifiers","srcset","file","name","src","alt","_toDisplayString","description","_","__exports__","_hoisted_2","for","value","label","_hoisted_11","_hoisted_12","_hoisted_13","_hoisted_14","_hoisted_15","_hoisted_16","_hoisted_17","_hoisted_18","_hoisted_19","_createStaticVNode","_hoisted_20","_hoisted_22","_hoisted_23","_hoisted_24","_hoisted_25","_hoisted_26","_hoisted_27","_hoisted_28","_hoisted_29","_hoisted_30","categoryId","route","useRoute","router","useRouter","selectedCategoryId","ref","breadcrumbs","_selectedCategory$val","_selectedCategory$val2","selectedCategory","active","getSuitsFor","articleGroup","arr","uniqueArr","ids","item","suitsForId","push","removeDuplicates","flatMap","article","suitsFor","find","x","onCategoryChanged","Number","_selectedCategory$val5","_selectedCategory$val6","replace","watch","after","before","_selectedCategory$val3","_selectedCategory$val4","setMeta","useCanonical","newPath","oldPath","slice","filteredArticlesBySelectedCategory","_selectedCategory$val7","articles","filteredArticles","_selectedCategory$val8","isSold","list","property","groupedObjects","forEach","object","String","groupBy","soldArticles","_selectedCategory$val9","_selectedCategory$val10","_selectedCategory$val11","_selectedCategory$val12","_selectedCategory$val13","_selectedCategory$val14","useMeta","metaTitle","metaDescription","onMounted","async","_selectedCategory$val15","_selectedCategory$val16","setArticles","articleApi","getAllActive","Breadcrumbs","items","_withDirectives","$event","style","onChange","_vModelSelect","_createCommentVNode","listDescription","innerHTML","_createTextVNode","hasLoadedArticles","articlesGroup","groupKey","SuitsFor","showHeader","iconClasses","ArticleCard","heightClass","Categories"],"mappings":"kIAGA,MAAMA,EAAa,CAAEC,MAAO,sGA2BtBC,EAAa,CA1BaC,6BAAoB,MAAO,CAAEF,MAAO,qBAAuB,CAC5EE,6BAAoB,MAAO,CACtCF,MAAO,wCACPG,MAAO,6BACPC,KAAM,MACN,aAAc,cACdC,oBAAqB,iBACrBC,UAAW,SACV,CACYJ,6BAAoB,QAAS,KAAM,eACnCA,6BAAoB,OAAQ,CACvCK,MAAO,OACPC,OAAQ,OACRC,KAAM,cAGGP,6BAAoB,MAAO,CAAEF,MAAO,6BAA+B,CACjEE,6BAAoB,KAAM,CAAEF,MAAO,oCAAsC,CACvEE,6BAAoB,OAAQ,CAAEF,MAAO,4BAEvCE,6BAAoB,IAAK,CAAEF,MAAO,sCAClCE,6BAAoB,IAAK,CAAEF,MAAO,sCAClCE,6BAAoB,IAAK,CAAEF,MAAO,sCAClCE,6BAAoB,IAAK,CAAEF,MAAO,oCAE/C,IAIEU,EAAa,CAAC,WACdC,EAAa,CAAC,UACdC,EAAa,CAAC,MAAO,OACrBC,EAAa,CAAEb,MAAO,iBACtBc,EAAa,CAAEd,MAAO,eACtBe,EAAa,CAAEf,MAAO,cACtBgB,EAAc,CAAEhB,MAAO,aAMDiB,gCAAiB,CAC3CC,OAAQ,aACRC,MAAO,CACDC,WAAY,CACRC,KAAMC,MACNC,QAASA,IAAM,KAGzBC,MAAMC,GAER,MAAMN,EAAQM,EAEJC,EAAYC,cAIZC,EAAaC,oBAA8B,IACxCH,EAAUE,WAAWE,OAItBX,EAAMC,WAAWU,OACVJ,EAAUE,WAAWG,QAAOC,IAAab,EAAMC,WAAWa,SAASD,EAASE,MAGhFR,EAAUE,WAPN,KAWnB,MAAO,CAACO,EAAUC,KAChB,MAAMC,EAAyBC,2BAAkB,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,CAC/CxC,MAAO,0BACP4C,IAAKmE,EAAQ7E,IACZ,CACDa,sBAAakI,IAAa,CACxBlE,QAASA,EACTmE,YAAa,SACZ,KAAM,EAAG,CAAC,iBAEb,aAGN,OAtCH3I,sBAAcC,6BAAoB,MAAOoC,EAAa,CACrDC,EACA3E,6BAAoB,MAAO6E,EAAa,EACrCxC,wBAAkBC,6BAAoBG,WAAW,KAAME,qBAA6C,IAAhCJ,gBAAO0D,GAAkBjE,GAAW,EAAI,GAAKY,IACxGP,sBAAcC,6BAAoB,MAAO,CAC/CxC,MAAO,WACP4C,IAAKE,GACJkC,MACD,WA+BqB,IAAhCvC,gBAAO0D,GAAkBjE,IAAYO,gBAAOsG,GAAcjH,SAAWK,EAAKO,WACtEH,sBAAcC,6BAAoB,MAAO4C,EAAa,CACrDC,EACAnF,6BAAoB,MAAOoF,EAAa,EACrC/C,wBAAkBC,6BAAoBG,WAAW,KAAME,qBAAYJ,gBAAOsG,IAAgBhC,IACjFxE,sBAAcC,6BAAoB,MAAO,CAC/CxC,MAAO,+BACP4C,IAAKmE,EAAQ7E,IACZ,CACDa,sBAAakI,IAAa,CACxBlE,QAASA,EACTmE,YAAa,SACZ,KAAM,EAAG,CAAC,iBAEb,WAGRX,6BAAoB,IAAG,KAE7BrK,6BAAoB,UAAWqF,EAAa,CAC1CC,EACAzC,sBAAaoI,IAAY,CACvB/J,WAAY,CAAC0E,EAAmB3B,QAC/B,KAAM,EAAG,CAAC,kBAEd,GAAE,CAAF,I,UCpVL,MAAMH,EAAc,EAEL,a,yDCPf","file":"js/Articles.6ec139ce.js","sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, createElementVNode as _createElementVNode, createCommentVNode as _createCommentVNode, toDisplayString as _toDisplayString, withModifiers as _withModifiers, resolveComponent as _resolveComponent, withCtx as _withCtx, createVNode as _createVNode } from \"vue\"\n\nconst _hoisted_1 = { class: \"mt-4 row gx-4 gx-lg-4 row-cols-1 row-cols-md-2 row-cols-xl-4 justify-content-center cursor-pointer\" }\nconst _hoisted_2 = /*#__PURE__*/_createElementVNode(\"div\", { class: \"card h-100 shadow\" }, [\n /*#__PURE__*/_createElementVNode(\"svg\", {\n class: \"bd-placeholder-img card-img-top h-100\",\n xmlns: \"http://www.w3.org/2000/svg\",\n role: \"img\",\n \"aria-label\": \"Placeholder\",\n preserveAspectRatio: \"xMidYMid slice\",\n focusable: \"false\"\n }, [\n /*#__PURE__*/_createElementVNode(\"title\", null, \"Placeholder\"),\n /*#__PURE__*/_createElementVNode(\"rect\", {\n width: \"100%\",\n height: \"100%\",\n fill: \"#8d8f91\"\n })\n ]),\n /*#__PURE__*/_createElementVNode(\"div\", { class: \"card-body p-4 text-center\" }, [\n /*#__PURE__*/_createElementVNode(\"h4\", { class: \"card-title placeholder-glow mb-4\" }, [\n /*#__PURE__*/_createElementVNode(\"span\", { class: \"placeholder col-6 p-3\" })\n ]),\n /*#__PURE__*/_createElementVNode(\"p\", { class: \"card-text placeholder col-12 mb-2\" }),\n /*#__PURE__*/_createElementVNode(\"p\", { class: \"card-text placeholder col-10 mb-2\" }),\n /*#__PURE__*/_createElementVNode(\"p\", { class: \"card-text placeholder col-11 mb-2\" }),\n /*#__PURE__*/_createElementVNode(\"p\", { class: \"card-text placeholder col-7\" })\n ])\n], -1)\nconst _hoisted_3 = [\n _hoisted_2\n]\nconst _hoisted_4 = [\"onClick\"]\nconst _hoisted_5 = [\"srcset\"]\nconst _hoisted_6 = [\"src\", \"alt\"]\nconst _hoisted_7 = { class: \"card-body p-4\" }\nconst _hoisted_8 = { class: \"text-center\" }\nconst _hoisted_9 = { class: \"card-title\" }\nconst _hoisted_10 = { class: \"card-text\" }\n\nimport { computed, PropType } from 'vue';\r\n import { CategoryViewModel } from '@/types/CategoryViewModel';\r\n import { useRootStore } from '@/store/root.store';\r\n \nexport default /*#__PURE__*/_defineComponent({\n __name: 'Categories',\n props: {\r\n excludeIds: {\r\n type: Array as PropType,\r\n default: () => [] as number[],\r\n },\r\n },\n setup(__props) {\n\nconst props = __props\n\r\n const rootStore = useRootStore();\r\n\r\n \r\n\r\n const categories = computed(() => {\r\n if (!rootStore.categories.length) {\r\n return [];\r\n }\r\n\r\n if (props.excludeIds.length) {\r\n return rootStore.categories.filter(category => !props.excludeIds.includes(category.id));\r\n }\r\n\r\n return rootStore.categories;\r\n });\r\n\r\n\nreturn (_ctx: any,_cache: any) => {\n const _component_router_link = _resolveComponent(\"router-link\")!\n\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n (_unref(rootStore).isLoading)\n ? (_openBlock(), _createElementBlock(_Fragment, { key: 0 }, _renderList(3, (index) => {\n return _createElementVNode(\"div\", {\n class: \"col mb-5\",\n key: index\n }, _hoisted_3)\n }), 64))\n : (_openBlock(true), _createElementBlock(_Fragment, { key: 1 }, _renderList(_unref(categories), (category) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"col mb-5\",\n key: category.id\n }, [\n _createVNode(_component_router_link, {\n to: { path: category.urlSlug },\n custom: \"\"\n }, {\n default: _withCtx(({ navigate }) => [\n _createElementVNode(\"div\", {\n class: \"card h-100 shadow\",\n onClick: _withModifiers(navigate, [\"stop\"])\n }, [\n _createElementVNode(\"picture\", null, [\n _createElementVNode(\"source\", {\n srcset: `/images/${category.file.name}.webp`,\n type: \"image/webp\"\n }, null, 8, _hoisted_5),\n _createElementVNode(\"img\", {\n src: `/images/${category.file.name}.png`,\n class: \"card-img-top w-100\",\n alt: `Bild för kategori ${category.name}`\n }, null, 8, _hoisted_6)\n ]),\n _createElementVNode(\"div\", _hoisted_7, [\n _createElementVNode(\"div\", _hoisted_8, [\n _createElementVNode(\"h4\", _hoisted_9, _toDisplayString(category.name), 1),\n _createElementVNode(\"p\", _hoisted_10, _toDisplayString(category.description), 1)\n ])\n ])\n ], 8, _hoisted_4)\n ]),\n _: 2\n }, 1032, [\"to\"])\n ]))\n }), 128))\n ]))\n}\n}\n\n})","import script from \"./Categories.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./Categories.vue?vue&type=script&setup=true&lang=ts\"\n\nconst __exports__ = script;\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, createVNode as _createVNode, createElementVNode as _createElementVNode, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, toDisplayString as _toDisplayString, vModelSelect as _vModelSelect, withDirectives as _withDirectives, createCommentVNode as _createCommentVNode, resolveComponent as _resolveComponent, withCtx as _withCtx, createTextVNode as _createTextVNode, createStaticVNode as _createStaticVNode } from \"vue\"\n\nconst _hoisted_1 = { class: \"row\" }\nconst _hoisted_2 = { class: \"col\" }\nconst _hoisted_3 = { class: \"col-5\" }\nconst _hoisted_4 = { class: \"d-flex align-items-center justify-content-end sort-category\" }\nconst _hoisted_5 = /*#__PURE__*/_createElementVNode(\"label\", {\n for: \"select-category-id\",\n class: \"me-2 d-none d-sm-block\"\n}, \"Kategorier\", -1)\nconst _hoisted_6 = /*#__PURE__*/_createElementVNode(\"option\", { value: \"-1\" }, \"Start\", -1)\nconst _hoisted_7 = /*#__PURE__*/_createElementVNode(\"optgroup\", { label: \"Kategorier\" }, null, -1)\nconst _hoisted_8 = [\"value\"]\nconst _hoisted_9 = { class: \"row\" }\nconst _hoisted_10 = {\n key: 0,\n class: \"d-none d-md-block col-md-2\"\n}\nconst _hoisted_11 = [\"srcset\"]\nconst _hoisted_12 = [\"src\"]\nconst _hoisted_13 = { class: \"col-12 col-md-10\" }\nconst _hoisted_14 = { class: \"fw-bolder mb-4\" }\nconst _hoisted_15 = {\n key: 0,\n class: \"lead\"\n}\nconst _hoisted_16 = [\"innerHTML\"]\nconst _hoisted_17 = [\"onClick\"]\nconst _hoisted_18 = {\n key: 0,\n class: \"row\"\n}\nconst _hoisted_19 = /*#__PURE__*/_createStaticVNode(\"
Model för artikel
\", 1)\nconst _hoisted_20 = { class: \"row gx-4 gx-lg-5 row-cols-1 row-cols-md-2 row-cols-xl-3 row-cols-xxl-4\" }\nconst _hoisted_21 = /*#__PURE__*/_createElementVNode(\"div\", {\n class: \"card shadow h-100\",\n \"aria-hidden\": \"true\"\n}, [\n /*#__PURE__*/_createElementVNode(\"svg\", {\n class: \"bd-placeholder-img card-img-top\",\n width: \"100%\",\n height: \"180\",\n xmlns: \"http://www.w3.org/2000/svg\",\n role: \"img\",\n \"aria-label\": \"Placeholder\",\n preserveAspectRatio: \"xMidYMid slice\",\n focusable: \"false\"\n }, [\n /*#__PURE__*/_createElementVNode(\"title\", null, \"Placeholder\"),\n /*#__PURE__*/_createElementVNode(\"rect\", {\n width: \"465\",\n height: \"390\",\n fill: \"#8d8f91\"\n })\n ]),\n /*#__PURE__*/_createElementVNode(\"div\", { class: \"card-body p-4 text-center\" }, [\n /*#__PURE__*/_createElementVNode(\"h4\", { class: \"card-title placeholder-glow\" }, [\n /*#__PURE__*/_createElementVNode(\"span\", { class: \"placeholder col-6 p-3\" })\n ]),\n /*#__PURE__*/_createElementVNode(\"span\", { class: \"placeholder col-5 p-1\" })\n ])\n], -1)\nconst _hoisted_22 = [\n _hoisted_21\n]\nconst _hoisted_23 = { class: \"d-flex align-items-center\" }\nconst _hoisted_24 = { class: \"mb-4\" }\nconst _hoisted_25 = { class: \"row gx-4 gx-lg-5 row-cols-1 row-cols-md-2 row-cols-xl-3 row-cols-xxl-4\" }\nconst _hoisted_26 = {\n key: 2,\n class: \"row border-top pt-5\"\n}\nconst _hoisted_27 = /*#__PURE__*/_createElementVNode(\"h3\", null, \"Några tidigare projekt\", -1)\nconst _hoisted_28 = { class: \"row gx-4 gx-lg-5 row-cols-1 row-cols-md-2 row-cols-xl-3 row-cols-xxl-4\" }\nconst _hoisted_29 = { class: \"mt-5 border-top border-3 pt-5\" }\nconst _hoisted_30 = /*#__PURE__*/_createElementVNode(\"h4\", { class: \"text-center display-6\" }, \"Utforska mer\", -1)\n\nimport { useRoute, useRouter } from 'vue-router';\r\n import { onMounted, ref, computed, watch } from 'vue';\r\n import { articleApi } from '@/services/article.service';\r\n import { ArticleViewModel } from '@/types/ArticleViewModel';\r\n import { CategoryViewModel } from '@/types/CategoryViewModel';\r\n import ArticleCard from '@/components/ArticleCard.vue';\r\n import Breadcrumbs from '@/components/Breadcrumbs.vue';\r\n import Categories from '@/components/Categories.vue';\r\n import SuitsFor from '@/components/SuitsFor.vue';\r\n import { useMeta } from '@/composables/meta';\r\n import { useCanonical } from '@/composables/canonical';\r\n\r\n import { useRootStore } from '@/store/root.store';\r\n \nexport default /*#__PURE__*/_defineComponent({\n __name: 'Articles',\n props: {\n categoryId: null\n },\n setup(__props: any) {\n\nconst props = __props as { categoryId: number }\n\r\n const rootStore = useRootStore();\r\n const route = useRoute();\r\n const router = useRouter();\r\n\r\n \r\n const selectedCategoryId = ref(props.categoryId);\r\n\r\n const breadcrumbs = computed(() => {\r\n return [\r\n { name: selectedCategory.value?.name, path: selectedCategory.value?.urlSlug, active: true }\r\n ]\r\n });\r\n\r\n function getSuitsFor(articleGroup: ArticleViewModel[]) {\r\n return removeDuplicates(articleGroup.flatMap(article => article.suitsFor));\r\n }\r\n\r\n function removeDuplicates(arr: any[]) {\r\n const uniqueArr: any[] = [];\r\n const ids: any[] = [];\r\n\r\n for (const item of arr) {\r\n if (!ids.includes(item.suitsForId)) {\r\n uniqueArr.push(item);\r\n ids.push(item.suitsForId);\r\n }\r\n }\r\n\r\n return uniqueArr;\r\n }\r\n\r\n const selectedCategory = computed(() => {\r\n return rootStore.categories.length\r\n ? rootStore.categories.find(x => x.id === selectedCategoryId.value)\r\n : {} as CategoryViewModel;\r\n });\r\n\r\n function groupBy(list: T[], property: keyof T) {\r\n const groupedObjects: { [key: string]: T[] } = {};\r\n\r\n list.forEach(object => {\r\n const key = String(object[property]);\r\n\r\n if (!groupedObjects[key]) {\r\n groupedObjects[key] = [];\r\n }\r\n\r\n groupedObjects[key].push(object);\r\n });\r\n\r\n return groupedObjects;\r\n }\r\n\r\n watch(selectedCategoryId, (after, before) => {\r\n setMeta();\r\n useCanonical(selectedCategory.value?.urlSlug ?? '/');\r\n });\r\n\r\n watch(() => route.path, (newPath, oldPath) => {\r\n if (newPath !== oldPath) {\r\n const category = rootStore.categories.find(x => x.urlSlug === newPath.slice(1, newPath.length));\r\n if (category)\r\n selectedCategoryId.value = category.id;\r\n }\r\n });\r\n\r\n function onCategoryChanged() {\r\n if (Number(selectedCategoryId.value) === -1)\r\n router.push({ name: 'Start' });\r\n else {\r\n const urlSlug = selectedCategory.value?.urlSlug ?? '/';\r\n router.replace({ path: urlSlug });\r\n }\r\n }\r\n\r\n const filteredArticlesBySelectedCategory = computed(() => {\r\n if (rootStore.articles.length && selectedCategory.value?.id) {\r\n let filteredArticles = rootStore.articles.filter(x => x.categoryId === selectedCategory.value?.id);\r\n if (selectedCategory.value.id !== 2)\r\n filteredArticles = filteredArticles.filter(x => !x.isSold);\r\n\r\n return groupBy(filteredArticles, 'modelName');\r\n }\r\n\r\n return {};\r\n });\r\n\r\n const soldArticles = computed(() => {\r\n if (rootStore.articles.length && selectedCategory.value?.id) {\r\n const filteredArticles = rootStore.articles.filter(x => x.categoryId === selectedCategory.value?.id && x.isSold);\r\n return filteredArticles;\r\n }\r\n\r\n return {};\r\n });\r\n\r\n function setMeta() {\r\n useMeta(selectedCategory.value?.metaTitle ?? '', selectedCategory.value?.metaDescription ?? '');\r\n }\r\n\r\n onMounted(async () => {\r\n setMeta();\r\n useCanonical(selectedCategory.value?.urlSlug ?? '/');\r\n rootStore.setArticles(await articleApi.getAllActive());\r\n });\r\n\nreturn (_ctx: any,_cache: any) => {\n const _component_router_link = _resolveComponent(\"router-link\")!\n\n return (_openBlock(), _createElementBlock(_Fragment, null, [\n _createElementVNode(\"section\", null, [\n _createElementVNode(\"div\", _hoisted_1, [\n _createElementVNode(\"div\", _hoisted_2, [\n _createVNode(Breadcrumbs, { items: _unref(breadcrumbs) }, null, 8, [\"items\"])\n ]),\n _createElementVNode(\"div\", _hoisted_3, [\n _createElementVNode(\"div\", _hoisted_4, [\n _hoisted_5,\n _withDirectives(_createElementVNode(\"select\", {\n id: \"select-category-id\",\n class: \"form-select\",\n \"onUpdate:modelValue\": _cache[0] || (_cache[0] = ($event: any) => ((selectedCategoryId).value = $event)),\n style: {\"width\":\"120px\"},\n onChange: onCategoryChanged\n }, [\n _hoisted_6,\n _hoisted_7,\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_unref(rootStore).categories, (category) => {\n return (_openBlock(), _createElementBlock(\"option\", {\n key: category.id,\n value: category.id\n }, _toDisplayString(category.name), 9, _hoisted_8))\n }), 128))\n ], 544), [\n [_vModelSelect, selectedCategoryId.value]\n ])\n ])\n ])\n ]),\n _createElementVNode(\"div\", _hoisted_9, [\n (_unref(selectedCategory).id !== 2)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_10, [\n _createElementVNode(\"picture\", null, [\n _createElementVNode(\"source\", {\n srcset: `/images/${_unref(selectedCategory).file.name}.webp`,\n type: \"image/webp\"\n }, null, 8, _hoisted_11),\n _createElementVNode(\"img\", {\n src: `/images/${_unref(selectedCategory).file.name}.png`,\n class: \"img-fluid rounded\"\n }, null, 8, _hoisted_12)\n ])\n ]))\n : _createCommentVNode(\"\", true),\n _createElementVNode(\"div\", _hoisted_13, [\n _createElementVNode(\"h1\", _hoisted_14, _toDisplayString(_unref(selectedCategory).name), 1),\n (_unref(selectedCategory).listDescription)\n ? (_openBlock(), _createElementBlock(\"p\", _hoisted_15, [\n _createElementVNode(\"span\", {\n innerHTML: _unref(selectedCategory).listDescription\n }, null, 8, _hoisted_16),\n _createTextVNode(),\n _createVNode(_component_router_link, {\n to: { name: 'ContactUs' },\n custom: \"\"\n }, {\n default: _withCtx(({ navigate }) => [\n _createElementVNode(\"button\", {\n type: \"submit\",\n class: \"btn btn-primary d-block ms-auto mt-3\",\n onClick: navigate\n }, \" KONTAKTA OSS \", 8, _hoisted_17)\n ]),\n _: 1\n })\n ]))\n : _createCommentVNode(\"\", true)\n ])\n ]),\n (!_unref(rootStore).hasLoadedArticles)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_18, [\n _hoisted_19,\n _createElementVNode(\"div\", _hoisted_20, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList((_unref(selectedCategory).id === 2 ? 8 : 1), (index) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"col mb-5\",\n key: index\n }, _hoisted_22))\n }), 128))\n ])\n ]))\n : (_openBlock(true), _createElementBlock(_Fragment, { key: 1 }, _renderList(_unref(filteredArticlesBySelectedCategory), (articlesGroup, groupKey) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"row\",\n key: groupKey\n }, [\n _createElementVNode(\"div\", _hoisted_23, [\n _createElementVNode(\"h2\", _hoisted_24, _toDisplayString(groupKey), 1),\n _createVNode(SuitsFor, {\n items: getSuitsFor(articlesGroup),\n showHeader: false,\n iconClasses: 'extra-small d-inline-block mb-3 ms-2'\n }, null, 8, [\"items\"])\n ]),\n _createElementVNode(\"div\", _hoisted_25, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(articlesGroup, (article) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"col mb-5 cursor-pointer\",\n key: article.id\n }, [\n _createVNode(ArticleCard, {\n article: article,\n heightClass: 'h-100'\n }, null, 8, [\"article\"])\n ]))\n }), 128))\n ])\n ]))\n }), 128)),\n (_unref(selectedCategory).id !== 2 && _unref(soldArticles).length && !_ctx.isLoading)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_26, [\n _hoisted_27,\n _createElementVNode(\"div\", _hoisted_28, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_unref(soldArticles), (article) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"col mb-5 cursor-pointer mt-4\",\n key: article.id\n }, [\n _createVNode(ArticleCard, {\n article: article,\n heightClass: 'h-100'\n }, null, 8, [\"article\"])\n ]))\n }), 128))\n ])\n ]))\n : _createCommentVNode(\"\", true)\n ]),\n _createElementVNode(\"section\", _hoisted_29, [\n _hoisted_30,\n _createVNode(Categories, {\n excludeIds: [selectedCategoryId.value]\n }, null, 8, [\"excludeIds\"])\n ])\n ], 64))\n}\n}\n\n})","import script from \"./Articles.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./Articles.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./Articles.vue?vue&type=style&index=0&id=3106b7de&lang=css\"\n\nconst __exports__ = script;\n\nexport default __exports__","export * from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--7-oneOf-1-0!../../node_modules/css-loader/dist/cjs.js??ref--7-oneOf-1-1!../../node_modules/vue-loader-v16/dist/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--7-oneOf-1-2!../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../node_modules/vue-loader-v16/dist/index.js??ref--1-1!./Articles.vue?vue&type=style&index=0&id=3106b7de&lang=css\""],"sourceRoot":""}