Liferay.Loader.define("data-engine-taglib@3.3.26/data_layout_builder/js/components/collapsable-panel/CollapsablePanel.es",["module","exports","require","@frontend-taglib-clay$clayui/button","@frontend-taglib-clay$clayui/icon","@frontend-taglib-clay$clayui/panel","liferay!frontend-js-react-web$classnames","liferay!frontend-js-react-web$react","../../hooks/index.es","../drop-down/DropDown.es"],(function(e,a,l){window;{Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0;var t=u(l("@frontend-taglib-clay$clayui/button")),n=u(l("@frontend-taglib-clay$clayui/icon")),d=u(l("@frontend-taglib-clay$clayui/panel")),o=u(l("liferay!frontend-js-react-web$classnames")),c=u(l("liferay!frontend-js-react-web$react")),s=l("../../hooks/index.es"),r=u(l("../drop-down/DropDown.es"));function u(e){return e&&e.__esModule?e:{default:e}}var i=({Header:e,actions:a,children:l,className:u,title:i})=>{const f=c.default.useRef(null),[p,m]=c.default.useState(!1),[y,b,E]=(0,s.useHeightTransition)(p,m,f);return c.default.createElement("div",{className:(0,o.default)("collapsable-panel","panel","panel-unstyled",u),role:"tablist"},c.default.createElement(c.default.Fragment,null,e?c.default.createElement(e,{expanded:p,setExpanded:m}):c.default.createElement(c.default.Fragment,null,c.default.createElement(t.default,{"aria-expanded":p,className:(0,o.default)("collapse-icon","collapse-icon-middle","panel-header","panel-header-link",{collapsed:!(!p&&y||p&&!y)}),displayType:"unstyled",onClick:E,role:"tab"},c.default.createElement(c.default.Fragment,null,c.default.createElement("span",{className:"panel-title"},i),c.default.createElement("span",{className:(0,o.default)("actions","collapse-icon-closed")},c.default.createElement(n.default,{symbol:"angle-down"})),c.default.createElement("span",{className:(0,o.default)("actions","collapse-icon-open")},c.default.createElement(n.default,{symbol:"angle-up"})))),a&&c.default.createElement("div",{className:"collapse-icon-options"},c.default.createElement(r.default,{actions:a}))),c.default.createElement("div",{className:(0,o.default)("panel-collapse",{collapse:!y,collapsing:y,show:p}),onTransitionEnd:b,ref:f,role:"tabpanel"},c.default.createElement(d.default.Body,null,l))))};a.default=i}}));
//# sourceMappingURL=CollapsablePanel.es.js.map