Liferay.Loader.define("dynamic-data-mapping-form-web@4.0.84/admin/js/plugins/field-sidebar/components/ElementSetList.es",["module","exports","require","data-engine-js-components-web","data-engine-taglib","liferay!frontend-js-react-web$react"],(function(e,t,n){var r;window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n("data-engine-js-components-web"),i=n("data-engine-taglib"),o=(r=n("liferay!frontend-js-react-web$react"))&&r.__esModule?r:{default:r};function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const e=({searchTerm:e})=>o.default.createElement("div",{className:"mt-2"},o.default.createElement(i.EmptyState,{emptyState:{description:Liferay.Language.get("there-are-no-element-sets-yet"),title:Liferay.Language.get("there-are-no-element-sets")},keywords:e,small:!0}));var s=({searchTerm:t=""})=>{const{fieldSetDefinitionURL:n,portletNamespace:r}=(0,a.useConfig)(),{activePage:s,editingLanguageId:d,elementSets:m,pages:f}=(0,a.useFormState)(),u=(0,a.useForm)(),g=i.SearchUtils.getSearchRegex(t),p=m.filter((({name:e})=>g.test(e)));return p.length?o.default.createElement("div",{className:"mt-3"},p.map(((e,t)=>{const g={definitionURL:n,editingLanguageId:d,elementSetId:e.id,elementSets:m,namespace:r};return o.default.createElement(i.FieldType,{dragType:"elementSet:add",icon:"forms",key:t,label:e.name,onDoubleClick:()=>{const e={pageIndex:s,rowIndex:f[s].rows.length};u((0,a.elementSetAdded)(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){c(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({indexes:e},g)))},payload:g})}))):o.default.createElement(e,{searchTerm:t})};t.default=s}}));
//# sourceMappingURL=ElementSetList.es.js.map