'use client';
import{jsx as r}from"react/jsx-runtime";import{useVariants as e,useSelectedOption as t}from"@gem-sdk/core";import o from"../dropdown-swatches/Dropdown.js";import{useMemo as n}from"react";let DropdownGroup=({...a})=>{let i=e(),{selectedOptions:p}=t(),d=n(()=>{let r=Object.keys(p||{}),e=i.find(e=>{let t=0;return r.forEach(r=>{let o=e?.selectedOptions.find(e=>e.name===r);o?.value===p?.[r]&&t++}),t===r.length});return e},[i,p]);return r(o,{variants:i,initValue:d?.id,variantGroup:!0,...a})};export{DropdownGroup as default};
