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