'use client';
"use strict";var e=require("tslib"),t=require("react"),r=require("tailwind-merge"),i=require("../../../assets/ArrowUpHeadIcon.cjs"),a=require("../../../lib/sizing.cjs"),l=require("../../../lib/spacing.cjs"),n=require("../../../lib/theme.cjs"),s=require("../../../lib/utils.cjs"),c=require("./Accordion.cjs");function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var d=o(t);const u=s.makeClassName("AccordionHeader"),g=d.default.forwardRef(((o,g)=>{const{children:m,className:f,onClick:p}=o,x=e.__rest(o,["children","className","onClick"]),{isExpanded:h,setIsExpanded:w}=t.useContext(c.ExpandedContext);return d.default.createElement("button",Object.assign({ref:g,className:r.twMerge(u("root"),"w-full flex items-center justify-between",l.spacing.threeXl.paddingX,l.spacing.lg.paddingY,f),onClick:e=>{null==w||w(!h),null==p||p(e)},type:"button"},x),d.default.createElement("div",{className:r.twMerge(u("children"),"flex flex-1",l.spacing.threeXl.marginRight)},m),d.default.createElement("div",null,d.default.createElement(i,{className:r.twMerge(u("arrowIcon"),h?"transition-all":"transition-all -rotate-180",s.getColorClassNames(n.DEFAULT_COLOR,n.colorPalette.lightText).textColor,l.spacing.twoXs.negativeMarginRight,a.sizing.xl.height,a.sizing.xl.width)})))}));g.displayName="AccordionHeader",module.exports=g;
