import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import * as AccordionPrimitive from "@radix-ui/react-accordion";
import clsx from "clsx";
import { ChevronRight } from "lucide-react";
import { forwardRef } from "react";
import { IconButton } from "../IconButton";
import { Separator } from "../Separator";
export const FoldableSectionRoot = forwardRef(({ className, style, ...props }, ref) => (_jsx(AccordionPrimitive.Root, { ref: ref, className: clsx("openui-foldable-section-root", className), style: style, ...props })));
FoldableSectionRoot.displayName = "FoldableSectionRoot";
export const FoldableSectionItem = forwardRef(({ className, style, value, ...props }, ref) => (_jsx(AccordionPrimitive.Item, { ref: ref, className: clsx("openui-foldable-section-item", className), style: style, value: value, ...props })));
FoldableSectionItem.displayName = "FoldableSectionItem";
export const FoldableSectionTrigger = forwardRef(({ className, style, text, ...props }, ref) => (_jsx(AccordionPrimitive.Header, { className: "openui-foldable-section-header", children: _jsx(AccordionPrimitive.Trigger, { ref: ref, className: clsx("openui-foldable-section-trigger", className), style: style, ...props, children: _jsxs("div", { className: "openui-foldable-section-trigger-content-wrapper", children: [_jsx(Separator, { className: "openui-foldable-section-trigger-content-separator" }), _jsxs("div", { className: "openui-foldable-section-trigger-content-icon-button-wrapper", children: [_jsx(IconButton, { asChild: true, icon: _jsx(ChevronRight, { className: "openui-foldable-section-trigger-content-icon-button-icon" }), size: "3-extra-small", variant: "secondary", className: "openui-foldable-section-trigger-content-icon-button", children: _jsx("span", { "aria-hidden": "true" }) }), _jsx("div", { className: "openui-foldable-section-trigger-content-text", children: text })] })] }) }) })));
FoldableSectionTrigger.displayName = "FoldableSectionTrigger";
export const FoldableSectionContent = forwardRef(({ className, style, children, ...props }, ref) => (_jsx(AccordionPrimitive.Content, { ref: ref, className: clsx("openui-foldable-section-content", className), style: style, ...props, children: children })));
FoldableSectionContent.displayName = "FoldableSectionContent";
//# sourceMappingURL=FoldableSection.js.map