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