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