import{At as e}from"./vendor-react-N_fu9J_Y.js";import{t}from"./bundle-mjs-CSHEVFDI.js";import{t as n}from"./useAccordionState-Cl_YkTWP.js";var r=e(),i=({title:e,children:i,labelContent:a,tabRightLabelContent:o,name:s,className:c,defaultOpen:l=!1,disabled:u,stickyHeader:d=!0})=>{let{isCompleted:f,toggle:p}=n(s,l),m=()=>{u||p()};return(0,r.jsxs)(`div`,{className:t(`w-full h-min px-[20px] border-b border-gray-300`,c),role:`tab`,title:s,children:[(0,r.jsxs)(`header`,{className:t(`w-full bg-white flex gap-[8px] items-center justify-between py-[28px]`,d&&`z-20 sticky top-[44px] md:relative md:top-auto border-b border-solid border-gray-300 -mx-[20px] px-[20px] w-[calc(100%+40px)] md:border-b-0 md:mx-0 md:px-0 md:w-full`,u?`cursor-not-allowed opacity-60`:`cursor-pointer`),onClick:m,"aria-disabled":u,children:[e,(0,r.jsxs)(`div`,{className:`flex items-center gap-[16px]`,children:[o&&o,(0,r.jsx)(`button`,{onClick:e=>{e.stopPropagation(),m()},className:`flex items-center`,disabled:u,children:(0,r.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`19`,height:`10`,viewBox:`0 0 19 10`,fill:`none`,className:!u&&!f?`rotate-180`:``,children:(0,r.jsx)(`path`,{d:`M1 1L9.53432 9L17.7273 1`,stroke:`black`})})})]})]}),a&&f&&a,(0,r.jsx)(`section`,{className:t(`overflow-hidden transition-all duration-300 ease-in-out`,!u&&!f?`max-h-[5000px] opacity-100 py-[24px]`:`max-h-0 opacity-0`),children:i})]})};export{i as t};