Liferay.Loader.define("dynamic-data-mapping-form-field-type@6.0.145/FieldSet/Panel.es",["module","exports","require","./Panel.scss","@frontend-taglib-clay$clayui/button","@frontend-taglib-clay$clayui/icon","@frontend-taglib-clay$clayui/panel","liferay!frontend-js-react-web$classnames","data-engine-js-components-web","liferay!frontend-js-react-web$react"],(function(e,a,t){window;{Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,t("./Panel.scss");var l=_interopRequireDefault(t("@frontend-taglib-clay$clayui/button")),n=_interopRequireDefault(t("@frontend-taglib-clay$clayui/icon")),r=_interopRequireDefault(t("@frontend-taglib-clay$clayui/panel")),o=_interopRequireDefault(t("liferay!frontend-js-react-web$classnames")),d=t("data-engine-js-components-web"),i=_interopRequireDefault(t("liferay!frontend-js-react-web$react"));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const PanelHeader=({name:e,readOnly:a,repeatable:t,showRepeatableRemoveButton:r,title:o})=>{const u=(0,d.useForm)();return i.default.createElement("div",{className:"ddm-form-field-panel-header-container"},i.default.createElement("label",{className:"text-uppercase"},o),t&&i.default.createElement("span",{className:"actions collapse-icon-options"},i.default.createElement("div",{className:"lfr-ddm-form-field-repeatable-toolbar"},r&&i.default.createElement(l.default,{className:"ddm-form-field-repeatable-delete-button lfr-portal-tooltip p-0",disabled:a,onClick:a=>{a.stopPropagation(),u({payload:e,type:d.EVENT_TYPES.FIELD.REMOVED})},small:!0,title:Liferay.Language.get("remove")},i.default.createElement(n.default,{symbol:"hr"})),i.default.createElement(l.default,{className:"ddm-form-field-repeatable-add-button lfr-portal-tooltip p-0",disabled:a,onClick:a=>{a.stopPropagation(),u({payload:e,type:d.EVENT_TYPES.FIELD.REPEATED})},small:!0,title:Liferay.Language.get("duplicate")},i.default.createElement(n.default,{symbol:"plus"})))))};var _default=({children:e,name:a,readOnly:t,repeatable:l,showRepeatableRemoveButton:n,title:d})=>i.default.createElement(r.default,{className:(0,o.default)("collapsable-panel","panel","panel-unstyled"),collapsable:!0,defaultExpanded:!0,displayTitle:i.default.createElement(PanelHeader,{name:a,readOnly:t,repeatable:l,showRepeatableRemoveButton:n,title:d}),role:"tablist"},i.default.createElement(i.default.Fragment,null,i.default.createElement(r.default.Body,null,e)));a.default=_default}}));
//# sourceMappingURL=Panel.es.js.map