{"version":3,"file":"QuantityStepsUpdater-BLxJvU4x.js","sources":["../../src/components/shop-modules/quantity-steps-updater/QuantityStepsUpdater.vue"],"sourcesContent":["<template>\n  <quantity-steps\n    :ref=\"(ref) => (quantitySteps = ref)\"\n    :item=\"item\"\n    :template=\"template\"\n    :requested-quantity=\"internalRequestedQuantity\"\n    :light=\"light\"\n    :auto-width=\"autoWidth\"\n    small\n    @update-quantity=\"updateQuantity\"\n    @quantity-input=\"$emit('quantity-input')\"\n    @user-input=\"$emit('user-input', $event)\"\n    @value-rounded=\"(hint, dataTest2) => $emit('value-rounded', hint, dataTest2)\"\n  />\n</template>\n\n<script>\nimport QuantitySteps from 'components/shop-modules/quantity-steps/QuantitySteps';\n\nexport default {\n  name: 'QuantityStepsUpdater',\n  components: {\n    QuantitySteps,\n  },\n  props: {\n    item: {\n      type: Object,\n      default: null,\n    },\n    template: {\n      type: String,\n      default: '',\n    },\n    requestedQuantity: {\n      type: Number,\n      required: true,\n    },\n    autoWidth: {\n      type: Boolean,\n      default: false,\n    },\n    light: Boolean,\n  },\n  emits: ['quantity-input', 'update-quantity', 'user-input', 'value-rounded'],\n  data() {\n    return {\n      internalRequestedQuantity: 0,\n      quantitySteps: null,\n    };\n  },\n  created() {\n    this.internalRequestedQuantity = this.requestedQuantity;\n  },\n  methods: {\n    getInputValue() {\n      return this.quantitySteps ? this.quantitySteps.getInputValue() : null;\n    },\n    updateQuantity(value) {\n      const newValue = parseInt(value, 10);\n      this.$emit('quantity-input');\n      this.$emit('update-quantity', newValue);\n      this.internalRequestedQuantity = newValue;\n    },\n  },\n};\n</script>\n"],"names":["_sfc_main","QuantitySteps","value","newValue","_createBlock","_component_quantity_steps","ref","$data","$props","$options","_ctx","_cache","$event","hint","dataTest2"],"mappings":"4GAmBA,MAAKA,EAAU,CACb,KAAM,uBACN,WAAY,CACV,cAAAC,CACD,EACD,MAAO,CACL,KAAM,CACJ,KAAM,OACN,QAAS,IACV,EACD,SAAU,CACR,KAAM,OACN,QAAS,EACV,EACD,kBAAmB,CACjB,KAAM,OACN,SAAU,EACX,EACD,UAAW,CACT,KAAM,QACN,QAAS,EACV,EACD,MAAO,OACR,EACD,MAAO,CAAC,iBAAkB,kBAAmB,aAAc,eAAe,EAC1E,MAAO,CACL,MAAO,CACL,0BAA2B,EAC3B,cAAe,KAElB,EACD,SAAU,CACR,KAAK,0BAA4B,KAAK,iBACvC,EACD,QAAS,CACP,eAAgB,CACd,OAAO,KAAK,cAAgB,KAAK,cAAc,cAAgB,EAAE,IAClE,EACD,eAAeC,EAAO,CACpB,MAAMC,EAAW,SAASD,EAAO,EAAE,EACnC,KAAK,MAAM,gBAAgB,EAC3B,KAAK,MAAM,kBAAmBC,CAAQ,EACtC,KAAK,0BAA4BA,CAClC,CACF,CACH,iEA/DEC,EAYEC,EAAA,CAXC,IAAMC,GAASC,EAAA,cAAgBD,EAC/B,KAAME,EAAI,KACV,SAAUA,EAAQ,SAClB,qBAAoBD,EAAyB,0BAC7C,MAAOC,EAAK,MACZ,aAAYA,EAAS,UACtB,MAAA,GACC,iBAAiBC,EAAc,eAC/B,+BAAgBC,EAAK,MAAA,gBAAA,GACrB,YAAUC,EAAA,CAAA,IAAAA,EAAA,CAAA,EAAAC,GAAEF,EAAK,MAAA,aAAeE,CAAM,GACtC,eAAaD,EAAA,CAAA,IAAAA,EAAA,CAAA,EAAA,CAAGE,EAAMC,IAAcJ,EAAK,MAAA,gBAAkBG,EAAMC,CAAS"}