{"version":3,"file":"BasePriceFi-PTPFQf8R.js","sources":["../../src/components/atoms/base-price-fi/BasePriceFi.vue"],"sourcesContent":["<template>\n <div\n v-if=\"basePrices\"\n :class=\"[\n 'base-price-fi',\n small ? 'base-price-fi--small' : '',\n theme ? `base-price-fi--theme-${theme}` : '',\n ]\"\n >\n <div\n v-for=\"(basePrice, idx) in basePrices\"\n :key=\"idx\"\n >\n <template v-if=\"basePrice.valueFormatted\">\n {{ basePrice.valueFormatted }}\n </template>\n\n <template v-if=\"bestPrice.priceRows\">\n / {{ basePrice.qty }} {{ getSellingUnit(basePrice.unit)\n }}{{ idx !== basePrices.length - 1 ? ', ' : '' }}\n </template>\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { getSellingUnit } from 'composables/sellingUnit';\nimport { computed } from 'vue';\n\ndefineOptions({\n name: 'BasePriceFi',\n});\n\ninterface BasePrice {\n unit: string;\n qty: number;\n valueFormatted?: string;\n}\n\nconst props = withDefaults(\n defineProps<{\n bestPrice: {\n priceRows?: any;\n price?: {\n basePrices: BasePrice[];\n };\n };\n small?: boolean;\n theme: string | null;\n }>(),\n {\n bestPrice: () => ({}),\n theme: null,\n },\n);\n\nconst basePrices = computed<BasePrice[] | undefined>(() => props.bestPrice?.price?.basePrices);\n</script>\n\n<style scoped lang=\"scss\">\n@import './base-price-fi';\n</style>\n"],"names":["props","__props","basePrices","computed","_b","_a"],"mappings":"6SAuCA,MAAMA,EAAQC,EAiBRC,EAAaC,EAAkC,IAAM,SAAA,OAAAC,GAAAC,EAAAL,EAAM,YAAN,YAAAK,EAAiB,QAAjB,YAAAD,EAAwB,WAAU"}