import{Q as r}from"./QuantitySteps-C4blGfD3.js";import{_ as l,r as o,o as d,a as y}from"./main-DHoZdmBw.js";const m={name:"QuantityStepsUpdater",components:{QuantitySteps:r},props:{item:{type:Object,default:null},template:{type:String,default:""},requestedQuantity:{type:Number,required:!0},autoWidth:{type:Boolean,default:!1},light:Boolean},emits:["quantity-input","update-quantity","user-input","value-rounded"],data(){return{internalRequestedQuantity:0,quantitySteps:null}},created(){this.internalRequestedQuantity=this.requestedQuantity},methods:{getInputValue(){return this.quantitySteps?this.quantitySteps.getInputValue():null},updateQuantity(n){const t=parseInt(n,10);this.$emit("quantity-input"),this.$emit("update-quantity",t),this.internalRequestedQuantity=t}}};function q(n,t,u,Q,a,i){const s=o("quantity-steps");return d(),y(s,{ref:e=>a.quantitySteps=e,item:u.item,template:u.template,"requested-quantity":a.internalRequestedQuantity,light:u.light,"auto-width":u.autoWidth,small:"",onUpdateQuantity:i.updateQuantity,onQuantityInput:t[0]||(t[0]=e=>n.$emit("quantity-input")),onUserInput:t[1]||(t[1]=e=>n.$emit("user-input",e)),onValueRounded:t[2]||(t[2]=(e,p)=>n.$emit("value-rounded",e,p))},null,8,["item","template","requested-quantity","light","auto-width","onUpdateQuantity"])}const S=l(m,[["render",q]]);export{S as Q};