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