{"version":3,"file":"PaginationProgressBar-Dd9pAVOb.js","sources":["../../src/components/atoms/pagination-progress-bar/PaginationProgressBar.vue"],"sourcesContent":["<template>\n  <div class=\"infinite-pagination pagination-progress-bar\">\n    <div>\n      <button-fi\n        v-if=\"paginationPage < paginationTotal && showMoreButton\"\n        :href=\"href\"\n        :class=\"{\n          'pagination-progress-bar__button': true,\n          'button-fi__tertiary': true,\n        }\"\n        :disabled=\"disabledState\"\n        @click=\"loadMore\"\n      >\n        {{\n          showMoreButtonText ? showMoreButtonText : $dict.get('product-List.Pagination.Load-More')\n        }}\n      </button-fi>\n\n      <div class=\"pagination-progress-bar__text\">\n        <slot> {{ paginationPage }} / {{ paginationTotal }} </slot>\n      </div>\n    </div>\n\n    <div class=\"pagination-progress-bar__bar\">\n      <div\n        class=\"pagination-progress-bar__bar-progress\"\n        :style=\"{ width: `${Math.min(progressbarValue, 100)}%` }\"\n      />\n    </div>\n  </div>\n</template>\n\n<script>\nimport ButtonFi from 'atoms/button-fi/ButtonFi.vue';\nexport default {\n  name: 'PaginationProgressBar',\n  components: {\n    ButtonFi,\n  },\n  props: {\n    queryParams: {\n      type: String,\n      default: null,\n    },\n    paginationPage: {\n      type: Number,\n      required: true,\n    },\n    paginationTotal: {\n      type: Number,\n      required: true,\n    },\n    progressbarValue: {\n      type: Number,\n      required: true,\n    },\n    disabledState: {\n      type: Boolean,\n      required: false,\n      default: false,\n    },\n    showMoreButton: {\n      type: Boolean,\n      default: true,\n    },\n    showMoreButtonText: {\n      type: String,\n      default: null,\n    },\n  },\n  emits: ['loadmore'],\n  computed: {\n    getPaginationButtonLink() {\n      return this.paginationPage + 1;\n    },\n    href() {\n      if (this.disabledState) {\n        return null;\n      }\n      return `${this.queryParams ? this.queryParams + '&' : '?'}page=${\n        this.getPaginationButtonLink\n      }`;\n    },\n  },\n  methods: {\n    loadMore(evt) {\n      if (this.$fischer.query('page')) {\n        if (this.href) {\n          window.location = this.href;\n          evt.preventDefault();\n        }\n        return;\n      }\n      evt.preventDefault();\n      this.$emit('loadmore', {});\n    },\n  },\n};\n</script>\n\n<style scoped lang=\"scss\">\n@import './pagination-progress-bar';\n</style>\n"],"names":["_sfc_main","ButtonFi","evt","_hoisted_1","_hoisted_2","_hoisted_3","_openBlock","_createElementBlock","_createElementVNode","$props","_createBlock","_component_button_fi","$options","_normalizeClass","_withCtx","_createTextVNode","_toDisplayString","_ctx","_createCommentVNode","_renderSlot","_normalizeStyle"],"mappings":"6HAkCA,MAAKA,EAAU,CACb,KAAM,wBACN,WAAY,CACV,SAAAC,CACD,EACD,MAAO,CACL,YAAa,CACX,KAAM,OACN,QAAS,IACV,EACD,eAAgB,CACd,KAAM,OACN,SAAU,EACX,EACD,gBAAiB,CACf,KAAM,OACN,SAAU,EACX,EACD,iBAAkB,CAChB,KAAM,OACN,SAAU,EACX,EACD,cAAe,CACb,KAAM,QACN,SAAU,GACV,QAAS,EACV,EACD,eAAgB,CACd,KAAM,QACN,QAAS,EACV,EACD,mBAAoB,CAClB,KAAM,OACN,QAAS,IACV,CACF,EACD,MAAO,CAAC,UAAU,EAClB,SAAU,CACR,yBAA0B,CACxB,OAAO,KAAK,eAAiB,CAC9B,EACD,MAAO,CACL,OAAI,KAAK,cACA,KAEF,GAAG,KAAK,YAAc,KAAK,YAAc,IAAM,GAAG,QACvD,KAAK,uBACP,EACD,CACF,EACD,QAAS,CACP,SAASC,EAAK,CACZ,GAAI,KAAK,SAAS,MAAM,MAAM,EAAG,CAC3B,KAAK,OACP,OAAO,SAAW,KAAK,KACvBA,EAAI,eAAc,GAEpB,MACF,CACAA,EAAI,eAAc,EAClB,KAAK,MAAM,WAAY,CAAA,CAAE,CAC1B,CACF,CACH,EAhGOC,EAAA,CAAA,MAAM,6CAA6C,EAiB/CC,EAAA,CAAA,MAAM,+BAA+B,EAKvCC,EAAA,CAAA,MAAM,8BAA8B,iDAtB3C,OAAAC,EAAA,EAAAC,EA4BM,MA5BNJ,EA4BM,CA3BJK,EAmBM,MAAA,KAAA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