'use client';
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("@gem-sdk/core"),l=require("react");exports.default=({value:a,isVariantOutStock:o,checked:r,swatchAutoWidth:s,swatchWidth:i,swatchHeight:c,optionTransform:g,optionTypography:n,optionBgColor:p,optionTextColor:d,optionBorder:b,optionRounded:v,optionHasShadow:S,optionShadow:y,optionTypo:C})=>{let m=t.makeStyleResponsive("w",t.makeWidth(i,s)),u=l.useMemo(()=>({...v,active:{...v?.active||{},radiusType:"custom"}}),[v]),h=t.composeTypographyClassName(C,n),x=t.composeTypographyStyle(C,n);return e.jsx("div",{className:t.cls(r?t.getGlobalColorClass("bg",p?.active):t.getGlobalColorStateClass("bg",p),t.handleConvertClassColor(b),h,"gp-box-border gp-inline-flex gp-cursor-pointer gp-items-center gp-justify-center gp-text-center",{"gp-pointer-events-none  !gp-cursor-not-allowed":o}),style:{...r?{}:t.getGlobalColorStateStyle("bg",p),...r?t.makeStyle({bg:t.getSingleColorVariable(p?.active),bs:b?.active?.border,bw:b?.active?.width,bc:t.getSingleColorVariable(b?.active?.color)}):{},...t.makeStyle({tt:g}),...x,...t.makeStyleResponsive("h",c),...m,...r?t.getRadiusStyleActiveState(u):t.composeRadius(v),...r?t.getStyleShadow({value:y?.active,state:"active",styleAppliedFor:"box-shadow",isEnableShadow:S?.active},!0):t.getStyleShadowState(y,"box-shadow",S),...r?{}:t.handleConvertBorderStyle(b),...r?{}:t.handleConvertBorderWidth(b),...r?{}:t.handleConvertBorderColor(b)},children:e.jsx("span",{className:t.cls("gp-flex gp-items-center gp-px-[16px]",r?t.getGlobalColorClass("text",d?.active):t.getGlobalColorStateClass("text",d)),style:{...r?t.makeStyle({c:t.getSingleColorVariable(d?.active)}):t.getGlobalColorStateStyle("c",d)},children:a?.label})})};
