"use strict";var e=require("@gem-sdk/core");const t="latest",r="gid://shopify/Product/",o="gid://shopify/ProductVariant/",a="gid://shopify/ProductOptionValue/",s="static";exports.DYNAMIC_PRODUCT_STATUS="dynamic",exports.PREFIX_PRODUCT_ID=r,exports.PREFIX_PRODUCT_OPTION_VALUE_ID=a,exports.PREFIX_PRODUCT_VARIANT_ID=o,exports.PRODUCT_ID_LATEST=t,exports.STATIC_PRODUCT_STATUS=s,exports.getData=p=>{let{setting:c,advanced:i,styles:d}=p,{productSetting:T,quantity:_,readOnly:I,isAuto:D,isSyncProduct:P,...u}=c??{},{...l}=d??{},{pos:n,top:O}=i??{},R=e.composeAdvanceStyle({pos:n,top:O}),A=T?.productHandle??"",C=T?.initialVariantBaseId,U=C?.replace(o,"")??"",S=T?.productId?.replace(r,"").toLowerCase()??t,x=T?.productStatus??s,g=T?.selectedOptions?.map(e=>e?.valueBaseID?.replace(a,""));return{formatVariantId:U,formatProductId:S,productStatus:x,preSelectedOptionIds:g,productHandle:A,advancedStyle:R,rowStyles:l,rowSetting:u}};
