'use client';
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),s=require("@gem-sdk/core"),t=require("../helpers/product-quantity/getClasses.js"),a=require("@gem-sdk/system"),r=require("../helpers/product-quantity/getStyles.js"),l=require("../hooks/useHandleQuantity.js");exports.default=({setting:u={},styles:n={}})=>{let{inputWidth:i,align:c}=n,{quantity:p,setQuantity:d}=s.useQuantity(),{value:o,onBlurInput:C,onChangeInput:m}=l.useHandleQuantity(p,d,u),y=s.useCurrentVariantInStock(),g=a.createClass(t.getWrapperClasses(c)),j=a.createClass(t.getContainerClasses()),h=a.createClass(t.getWrapperInputClasses()),q=a.createClass(t.getLabelClasses()),x=a.createClass(t.getInputClasses()),v=a.createStyle({...r.getWrapperStyles(i)});return e.jsx("div",{className:g,children:e.jsx("div",{className:j,style:{...v},children:e.jsxs("div",{className:h,children:[e.jsx("label",{htmlFor:"input",className:q,children:u.title||"Quantity"}),e.jsx("input",{disabled:!y,autoComplete:"off",name:"Select Option",className:x,type:"number",value:o,min:1,onBlur:C,onChange:m})]})})})};
