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