'use client';
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),core=require("@gem-sdk/core"),Dropdown=require("./Dropdown.js"),React=require("react");const VariantGroup=({...e})=>{let r=core.useVariants(),{selectedOptions:t}=core.useSelectedOption(),a=React.useMemo(()=>{let e=Object.keys(t||{}),a=r.find(r=>{let a=0;return e.forEach(e=>{let n=r?.selectedOptions.find(r=>r.name===e);n?.value===t?.[e]&&a++}),a===e.length});return a},[r,t]);return jsxRuntime.jsx(Dropdown.default,{variants:r,initValue:a?.id,variantGroup:e.variantGroup,...e})};exports.default=VariantGroup;
