"use client";
import { jsx } from 'react/jsx-runtime';
import { cx } from '../../node_modules/.pnpm/class-variance-authority@0.7.1/node_modules/class-variance-authority/dist/index.js';
import { forwardRef } from 'react';
import styles from './accordion.module.css.js';
import { Root as Root2 } from '../../node_modules/.pnpm/@radix-ui_react-accordion@1.2.11_@types_react-dom@19.1.7_@types_react@19.1.9__@types_react@19_mt5ahf6cxnui73dcsmqbdvyj2i/node_modules/@radix-ui/react-accordion/dist/index.js';

const AccordionRoot = forwardRef(({ className, type = 'single', ...rest }, ref) => {
    // this is a workaround to properly typecast the union type
    const singleProps = {
        type: 'single',
        collapsible: true,
        ...rest
    };
    const multipleProps = {
        type: 'multiple',
        ...rest
    };
    return (jsx(Root2, { ref: ref, className: cx(styles.accordion, className), ...(type === 'multiple' ? multipleProps : singleProps) }));
});
AccordionRoot.displayName = Root2.displayName;

export { AccordionRoot };
//# sourceMappingURL=accordion-root.js.map
