{"version":3,"file":"SearchPage-CLld_arF.mjs","names":[],"sources":["../src/components/pages/SearchPage.vue","../src/components/pages/SearchPage.vue"],"sourcesContent":["<template>\n  <section class=\"page-box\">\n    <h1>{{ titlePage }}</h1>\n    <ClassicSearch\n      v-model:text-init=\"rawQuery\"\n      :autofocus=\"true\"\n      id-search=\"search-page-input\"\n      :label=\"t('Please type at least three characters')\"\n    />\n    <PodcastList\n      v-if=\"!!query\"\n      :query=\"query\"\n      :first=\"0\"\n      :size=\"20\"\n      :sort-criteria=\"sortCriteria\"\n      @empty-list=\"noResult = true\"\n    />\n  </section>\n</template>\n\n<script setup lang=\"ts\">\nimport ClassicSearch from \"../form/ClassicSearch.vue\";\nimport PodcastList from \"../display/podcasts/PodcastList.vue\";\nimport { computed, ref, watch } from \"vue\";\nimport { useI18n } from \"vue-i18n\";\nimport { PodcastSort } from \"../../api/podcastApi\";\nimport { state } from \"../../stores/ParamSdkStore\";\n\n//Props\nconst props = defineProps({\n  queryRoute: { default: \"\", type: String },\n});\n\n//Data \nconst rawQuery = ref(\"\");\nconst noResult = ref(false);\n\n//Composables\nconst { t } = useI18n();\n\n\n//Computed\nconst sortCriteria = computed(() => {\n  return state.searchPage.sortCriteria ?? PodcastSort.DATE;\n});\n\nconst titlePage = computed(() =>{\n  const locale = !noResult.value ? \"Search results\" : \"Search - no results\";\n  return t(locale, { query: rawQuery.value });\n});\nconst query = computed(() =>{\n  return rawQuery.value && rawQuery.value.length >= 3 ? rawQuery.value : \"\";\n});\n\n\n//Watch\nwatch(()=>props.queryRoute, () => {\n  rawQuery.value = props.queryRoute;\n}, {immediate: true});\n</script>\n","<template>\n  <section class=\"page-box\">\n    <h1>{{ titlePage }}</h1>\n    <ClassicSearch\n      v-model:text-init=\"rawQuery\"\n      :autofocus=\"true\"\n      id-search=\"search-page-input\"\n      :label=\"t('Please type at least three characters')\"\n    />\n    <PodcastList\n      v-if=\"!!query\"\n      :query=\"query\"\n      :first=\"0\"\n      :size=\"20\"\n      :sort-criteria=\"sortCriteria\"\n      @empty-list=\"noResult = true\"\n    />\n  </section>\n</template>\n\n<script setup lang=\"ts\">\nimport ClassicSearch from \"../form/ClassicSearch.vue\";\nimport PodcastList from \"../display/podcasts/PodcastList.vue\";\nimport { computed, ref, watch } from \"vue\";\nimport { useI18n } from \"vue-i18n\";\nimport { PodcastSort } from \"../../api/podcastApi\";\nimport { state } from \"../../stores/ParamSdkStore\";\n\n//Props\nconst props = defineProps({\n  queryRoute: { default: \"\", type: String },\n});\n\n//Data \nconst rawQuery = ref(\"\");\nconst noResult = ref(false);\n\n//Composables\nconst { t } = useI18n();\n\n\n//Computed\nconst sortCriteria = computed(() => {\n  return state.searchPage.sortCriteria ?? PodcastSort.DATE;\n});\n\nconst titlePage = computed(() =>{\n  const locale = !noResult.value ? \"Search results\" : \"Search - no results\";\n  return t(locale, { query: rawQuery.value });\n});\nconst query = computed(() =>{\n  return rawQuery.value && rawQuery.value.length >= 3 ? rawQuery.value : \"\";\n});\n\n\n//Watch\nwatch(()=>props.queryRoute, () => {\n  rawQuery.value = props.queryRoute;\n}, {immediate: true});\n</script>\n"],"mappings":";;;;;;;;;;;;;;;EA6BA,MAAM,QAAQ;EAKd,MAAM,WAAW,IAAI,EAAE;EACvB,MAAM,WAAW,IAAI,KAAK;EAG1B,MAAM,EAAE,MAAM,QAAQ;EAItB,MAAM,eAAe,eAAe;GAClC,OAAO,MAAM,WAAW,gBAAgB,YAAY;EACtD,CAAC;EAED,MAAM,YAAY,eAAc;GAE9B,OAAO,EADQ,CAAC,SAAS,QAAQ,mBAAmB,uBACnC,EAAE,OAAO,SAAS,MAAM,CAAC;EAC5C,CAAC;EACD,MAAM,QAAQ,eAAc;GAC1B,OAAO,SAAS,SAAS,SAAS,MAAM,UAAU,IAAI,SAAS,QAAQ;EACzE,CAAC;EAID,YAAU,MAAM,kBAAkB;GAChC,SAAS,QAAQ,MAAM;EACzB,GAAG,EAAC,WAAW,KAAI,CAAC;;;;;;;;;;;;;;;;;;;;;mBCzDT,OAAM,WAAU;;qBAAzB,mBAgBU,WAhBV,YAgBU;EAfR,mBAAwB,MAAA,MAAA,gBAAjB,OAAA,SAAS,GAAA,CAAA;EAChB,YAKE,OAAA,kBAAA;GAJQ,aAAW,OAAA;8DAAA,OAAA,WAAQ;GAC1B,WAAW;GACZ,aAAU;GACT,OAAO,OAAA,EAAC,uCAAA;;IAGD,OAAA,SAAA,UAAA,GADV,YAOE,OAAA,gBAAA;;GALC,OAAO,OAAA;GACP,OAAO;GACP,MAAM;GACN,iBAAe,OAAA;GACf,aAAU,OAAA,OAAA,OAAA,MAAA,WAAE,OAAA,WAAQ"}