1import{O,r as s}from"./index-e89aacf5.js";function D(a={}){const{onClose:k,onOpen:p,isOpen:c,id:P}=a,t=O(p),i=O(k),[b,r]=s.useState(a.defaultIsOpen||!1),n=c!==void 0?c:b,o=c!==void 0,g=s.useId(),d=P??`disclosure-${g}`,l=s.useCallback(()=>{o||r(!1),i==null||i()},[o,i]),u=s.useCallback(()=>{o||r(!0),t==null||t()},[o,t]),f=s.useCallback(()=>{n?l():u()},[n,u,l]);function x(e={}){return{...e,"aria-expanded":n,"aria-controls":d,onClick(m){var C;(C=e.onClick)==null||C.call(e,m),f()}}}function I(e={}){return{...e,hidden:!n,id:d}}return{isOpen:n,onOpen:u,onClose:l,onToggle:f,isControlled:o,getButtonProps:x,getDisclosureProps:I}}export{D as u}; 2//# sourceMappingURL=use-disclosure-ce320206.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.