'use client';
import{__rest as e}from"tslib";import t from"react";import{twMerge as o}from"tailwind-merge";import{borderRadius as r,boxShadow as m,border as l}from"../../../lib/shape.js";import{makeClassName as s}from"../../../lib/utils.js";import"../../../contexts/BaseColorContext.js";import"../../../contexts/HoveredValueContext.js";import i from"../../../contexts/RootStylesContext.js";import"../../../contexts/SelectedValueContext.js";const n=s("AccordionList"),a=t.forwardRef(((s,a)=>{const{children:c,className:d}=s,p=e(s,["children","className"]),f=t.Children.count(c);return t.createElement("div",Object.assign({ref:a,className:o(n("root"),r.lg.all,m.md,d)},p),t.Children.map(c,((e,m)=>0===m?t.createElement(i.Provider,{value:o(r.lg.top,l.sm.left,l.sm.top,l.sm.right,l.sm.bottom)},t.cloneElement(e)):m===f-1?t.createElement(i.Provider,{value:o(r.lg.bottom,l.sm.left,l.sm.right,l.sm.bottom)},t.cloneElement(e)):t.createElement(i.Provider,{value:o(l.sm.left,l.sm.right,l.sm.bottom)},t.cloneElement(e)))))}));a.displayName="AccordionList";export{a as default};
