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