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MAAOG,GACLC,QAAQC,MAAMF,EAClB,IAGE,WAAEG,IAAeC,EAAAA,EAAAA,gBAkBvB,OAhBKD,EAAWN,MAKZb,KAJAqB,EAAAA,EAAAA,MAAoBC,MAAK,KACrBC,MAAMC,WAAW,KAMzBC,EAAAA,EAAAA,IAAMN,GAAaO,IACXA,EACA1B,IAEA2B,OAAOC,SAAS7C,KAAO,gBAC3B,IAGG,CACHH,OACAoB,YACAE,kBAER,I,cCnFJ,MAAM2B,GAA2B,OAAgB,EAAQ,CAAC,CAAC,SAAS7D,KAEpE,G","sources":["webpack://@sazka/web/../../node_modules/.pnpm/vue-loader@17.4.2_@vue+compiler-sfc@3.5.13_vue@3.5.13_typescript@5.7.3__webpack@5.95.0_@swc+c_34j4td3qllqrpsyknfjyyfkdq4/node_modules/vue-loader/dist/exportHelper.js","webpack://@sazka/web/./js/app/sports-bets/components/_sports-bets-history.vue?f87e","webpack://@sazka/web/./js/app/sports-bets/components/_sports-bets-history.vue","webpack://@sazka/web/./js/app/sports-bets/components/_sports-bets-history.vue?2f7b"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n// runtime helper for setting properties on components\n// in a tree-shakable way\nexports.default = (sfc, props) => {\n const target = sfc.__vccOpts || sfc;\n for (const [key, val] of props) {\n target[key] = val;\n }\n return target;\n};\n","import { renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, normalizeClass as _normalizeClass, createElementVNode as _createElementVNode, toDisplayString as _toDisplayString, createCommentVNode as _createCommentVNode, vShow as _vShow, withDirectives as _withDirectives } from \"vue\"\n\nconst _hoisted_1 = { class: \"bets\" }\nconst _hoisted_2 = [\"href\"]\nconst _hoisted_3 = { class: \"bet__info\" }\nconst _hoisted_4 = { class: \"bet__main-info\" }\nconst _hoisted_5 = { class: \"bet__type-name\" }\nconst _hoisted_6 = { class: \"bet__subtitle\" }\nconst _hoisted_7 = [\"innerHTML\"]\nconst _hoisted_8 = { class: \"bet__info__right\" }\nconst _hoisted_9 = { class: \"bet__stake\" }\nconst _hoisted_10 = {\n key: 0,\n class: \"bet__gain\"\n}\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n return (_openBlock(), _createElementBlock(_Fragment, null, [\n _createElementVNode(\"div\", _hoisted_1, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.bets, (bet, index) => {\n return (_openBlock(), _createElementBlock(\"a\", {\n href: `/kurzove-sazky/moje-sazky-vsazene-pred-22-6/${bet.purchaseBetId}`,\n class: \"bet\",\n key: index\n }, [\n _createElementVNode(\"div\", {\n class: _normalizeClass([\"bet__status-icon\", `bet__status-icon--${bet.betStatusClass}`])\n }, null, 2),\n _createElementVNode(\"div\", _hoisted_3, [\n _createElementVNode(\"div\", null, [\n _createElementVNode(\"div\", _hoisted_4, [\n _createElementVNode(\"div\", _hoisted_5, _toDisplayString(bet.title), 1),\n _createElementVNode(\"div\", _hoisted_6, _toDisplayString(bet.subtitle), 1)\n ]),\n _createElementVNode(\"div\", {\n class: \"bet__creation-date\",\n innerHTML: bet.creationDate\n }, null, 8, _hoisted_7)\n ]),\n _createElementVNode(\"div\", _hoisted_8, [\n _createElementVNode(\"div\", _hoisted_9, _toDisplayString(bet.stake) + \" KÄŤ (\" + _toDisplayString(bet.totalClientOdds) + \")\", 1),\n (bet.gainIncComboBoosterAmount)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_10, _toDisplayString(bet.gainIncComboBoosterAmount) + \" KÄŤ \", 1))\n : _createCommentVNode(\"\", true)\n ])\n ])\n ], 8, _hoisted_2))\n }), 128))\n ]),\n _withDirectives(_createElementVNode(\"button\", {\n type: \"button\",\n class: \"btn btn-link bets__next-page\",\n onClick: _cache[0] || (_cache[0] = \n//@ts-ignore\n(...args) => (_ctx.fetchBets && _ctx.fetchBets(...args)))\n }, \" NaÄŤĂst dalšà \", 512), [\n [_vShow, _ctx.canLoadMoreBets]\n ])\n ], 64))\n}","<template>\r\n <div class=\"bets\">\r\n <a\r\n :href=\"`/kurzove-sazky/moje-sazky-vsazene-pred-22-6/${bet.purchaseBetId}`\"\r\n class=\"bet\"\r\n v-for=\"(bet, index) in bets\"\r\n :key=\"index\"\r\n >\r\n <div class=\"bet__status-icon\" :class=\"`bet__status-icon--${bet.betStatusClass}`\"></div>\r\n <div class=\"bet__info\">\r\n <div>\r\n <div class=\"bet__main-info\">\r\n <div class=\"bet__type-name\">\r\n {{ bet.title }}\r\n </div>\r\n <div class=\"bet__subtitle\">{{ bet.subtitle }}</div>\r\n </div>\r\n <div class=\"bet__creation-date\" v-html=\"bet.creationDate\"></div>\r\n </div>\r\n <div class=\"bet__info__right\">\r\n <div class=\"bet__stake\">{{ bet.stake }} KÄŤ ({{ bet.totalClientOdds }})</div>\r\n <div v-if=\"bet.gainIncComboBoosterAmount\" class=\"bet__gain\">\r\n {{ bet.gainIncComboBoosterAmount }} KÄŤ\r\n </div>\r\n </div>\r\n </div>\r\n </a>\r\n </div>\r\n <button v-show=\"canLoadMoreBets\" type=\"button\" class=\"btn btn-link bets__next-page\" @click=\"fetchBets\">\r\n NaÄŤĂst dalšĂ\r\n </button>\r\n</template>\r\n\r\n<script lang=\"ts\">\r\nimport { ngFrameworkLoaded } from \"@sazka/ng/ng-integration\";\r\nimport { useNgSession } from \"@sazka/ng/ng-session\";\r\nimport { httpClient } from \"@sazka/utils/http-clients/http-client\";\r\nimport { defineComponent, ref, watch } from \"vue\";\r\n\r\nexport default defineComponent({\r\n name: \"SportBetsBetHistory\",\r\n\r\n setup() {\r\n const bets = ref([]);\r\n const page = ref(0);\r\n const canLoadMoreBets = ref(false);\r\n\r\n const fetchBets = async () => {\r\n try {\r\n const response = await httpClient.get<[]>(`/api/sports-bets?pageNumber=${page.value}`);\r\n\r\n if (response.data?.length) {\r\n canLoadMoreBets.value = true;\r\n } else {\r\n canLoadMoreBets.value = false;\r\n return;\r\n }\r\n\r\n bets.value = [...bets.value, ...response.data];\r\n page.value++;\r\n } catch (ex) {\r\n console.error(ex);\r\n }\r\n };\r\n\r\n const { isLoggedIn } = useNgSession();\r\n\r\n if (!isLoggedIn.value) {\r\n ngFrameworkLoaded().then(() => {\r\n ng_fw.showLogin();\r\n });\r\n } else {\r\n fetchBets();\r\n }\r\n\r\n watch(isLoggedIn, (loggedIn) => {\r\n if (loggedIn) {\r\n fetchBets();\r\n } else {\r\n window.location.href = \"/kurzove-sazky\";\r\n }\r\n });\r\n\r\n return {\r\n bets,\r\n fetchBets,\r\n canLoadMoreBets,\r\n };\r\n },\r\n});\r\n</script>\r\n","import { render } from \"./_sports-bets-history.vue?vue&type=template&id=20d2b296&ts=true\"\nimport script from \"./_sports-bets-history.vue?vue&type=script&lang=ts\"\nexport * from \"./_sports-bets-history.vue?vue&type=script&lang=ts\"\n\nimport exportComponent from \"../../../../../../node_modules/.pnpm/vue-loader@17.4.2_@vue+compiler-sfc@3.5.13_vue@3.5.13_typescript@5.7.3__webpack@5.95.0_@swc+c_34j4td3qllqrpsyknfjyyfkdq4/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render]])\n\nexport default __exports__"],"names":["exports","sfc","props","target","__vccOpts","key","val","_hoisted_1","class","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","_hoisted_10","render","_ctx","_cache","$props","$setup","$data","$options","_openBlock","_createElementBlock","_Fragment","_createElementVNode","_renderList","bets","bet","index","href","purchaseBetId","_normalizeClass","betStatusClass","_toDisplayString","title","subtitle","innerHTML","creationDate","stake","totalClientOdds","gainIncComboBoosterAmount","_createCommentVNode","_withDirectives","type","onClick","args","fetchBets","_vShow","canLoadMoreBets","defineComponent","name","setup","ref","page","async","_response$data","response","httpClient","get","value","data","length","ex","console","error","isLoggedIn","useNgSession","ngFrameworkLoaded","then","ng_fw","showLogin","watch","loggedIn","window","location","__exports__"],"sourceRoot":""}