Liferay.Loader.define("dynamic-data-mapping-form-field-type@6.0.122/FieldSet/Panel.es",["module","exports","require","./Panel.scss","@frontend-taglib-clay$clayui/button","@frontend-taglib-clay$clayui/icon","liferay!frontend-js-react-web$classnames","data-engine-js-components-web","liferay!frontend-js-react-web$react","./useHeightTransition.es"],(function(e,a,l){window;{Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,l("./Panel.scss");var t=_interopRequireDefault(l("@frontend-taglib-clay$clayui/button")),n=_interopRequireDefault(l("@frontend-taglib-clay$clayui/icon")),o=_interopRequireDefault(l("liferay!frontend-js-react-web$classnames")),d=l("data-engine-js-components-web"),r=_interopRequireDefault(l("liferay!frontend-js-react-web$react")),s=_interopRequireDefault(l("./useHeightTransition.es"));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var _default=({children:e,name:a,readOnly:l,repeatable:i,showLabel:u,showRepeatableRemoveButton:c,title:f})=>{const p=r.default.useRef(null),[m,b]=r.default.useState(!0),y=(0,d.useForm)(),[E,g,N]=(0,s.default)(m,b,p);return r.default.createElement("div",{className:(0,o.default)("collapsable-panel","panel","panel-unstyled"),role:"tablist"},r.default.createElement(r.default.Fragment,null,r.default.createElement(t.default,{"aria-expanded":m,className:(0,o.default)("collapse-icon","collapse-icon-middle","panel-header","panel-header-link",{collapsed:!(!m&&E||m&&!E)}),displayType:"unstyled",onClick:N,role:"tab"},r.default.createElement(r.default.Fragment,null,u&&r.default.createElement("span",{className:"panel-title"},r.default.createElement("label",{className:"text-uppercase"},f)),i&&r.default.createElement("span",{className:"actions collapse-icon-options"},r.default.createElement("div",{className:"lfr-ddm-form-field-repeatable-toolbar"},c&&r.default.createElement(t.default,{className:"ddm-form-field-repeatable-delete-button lfr-portal-tooltip p-0",disabled:l,onClick:e=>{e.stopPropagation(),y({payload:a,type:d.EVENT_TYPES.FIELD.REMOVED})},small:!0,title:Liferay.Language.get("remove")},r.default.createElement(n.default,{symbol:"hr"})),r.default.createElement(t.default,{className:"ddm-form-field-repeatable-add-button lfr-portal-tooltip p-0",disabled:l,onClick:e=>{e.stopPropagation(),y({payload:a,type:d.EVENT_TYPES.FIELD.REPEATED})},small:!0,title:Liferay.Language.get("duplicate")},r.default.createElement(n.default,{symbol:"plus"})))),r.default.createElement("span",{className:(0,o.default)("actions","collapse-icon-closed")},r.default.createElement(n.default,{symbol:"angle-down"})),r.default.createElement("span",{className:(0,o.default)("actions","collapse-icon-open")},r.default.createElement(n.default,{symbol:"angle-up"})))),r.default.createElement("div",{className:(0,o.default)("panel-collapse",{collapse:!E,collapsing:E,show:m}),onTransitionEnd:g,ref:p,role:"tabpanel"},e)))};a.default=_default}}));
//# sourceMappingURL=Panel.es.js.map