import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { Icon } from "@powerhousedao/design-system";
import { twJoin, twMerge } from "tailwind-merge";
export function Disclosure(props) {
    const { title, isOpen, onOpenChange, children, containerClassName, toggleClassName, contentClassName, } = props;
    return (_jsxs("div", { className: twMerge(containerClassName), children: [_jsxs("div", { className: twMerge("flex cursor-pointer justify-between text-gray-500", toggleClassName), onClick: onOpenChange, children: [_jsx("h2", { className: "font-semibold text-inherit", children: title }), _jsx(Icon, { className: twJoin("transition", isOpen ? "" : "-rotate-90"), size: 16, name: "ChevronDown" })] }), _jsx("div", { className: twMerge("max-h-0 overflow-hidden transition-[max-height] duration-300 ease-in-out", isOpen && "max-h-screen", contentClassName), children: children })] }));
}
//# sourceMappingURL=disclosure.js.map