Liferay.Loader.define("@liferay/search-experiences-web@3.0.7/sxp_blueprint_admin/js/shared/sxp_element/FieldListInput",["module","exports","require","@frontend-taglib-clay$clayui/button","@frontend-taglib-clay$clayui/form","@frontend-taglib-clay$clayui/icon","liferay!frontend-js-react-web$react","./FieldRow"],(function(e,t,a){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var l=c(a("@frontend-taglib-clay$clayui/button")),n=c(a("@frontend-taglib-clay$clayui/form")),r=c(a("@frontend-taglib-clay$clayui/icon")),o=c(a("liferay!frontend-js-react-web$react")),i=c(a("./FieldRow"));function c(e){return e&&e.__esModule?e:{default:e}}function d(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);t&&(l=l.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,l)}return a}function u(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?d(Object(a),!0).forEach((function(t){f(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):d(Object(a)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}function f(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function s({disabled:e,id:t,indexFields:a,name:c,setFieldTouched:d,setFieldValue:f,showBoost:s,value:b}){const y=()=>{d(c)},p=e=>t=>{f("".concat(c,"[").concat(e,"]"),u(u({},b[e]),t))},m=e=>()=>{y(),f(c,b.filter(((t,a)=>e!==a)))};return o.default.createElement("div",{className:"field"},null==b?void 0:b.map(((l,n)=>o.default.createElement(i.default,{boost:l.boost,disabled:e,field:l.field,id:0===n?t:"".concat(t,"_").concat(n),index:n,indexFields:a,key:n,languageIdPosition:l.languageIdPosition,locale:l.locale,onBlur:y,onChange:p(n),onDelete:m(n),showBoost:s}))),o.default.createElement(n.default.Group,{className:"add-remove-field"},o.default.createElement(l.default.Group,{spaced:!0},o.default.createElement(l.default,{"aria-label":Liferay.Language.get("add-field"),disabled:e,displayType:"secondary",monospaced:!0,onClick:()=>{f(c,[...b,{field:""}])},small:!0},o.default.createElement(r.default,{symbol:"plus"})))))}var b=o.default.memo(s);t.default=b}}));
//# sourceMappingURL=FieldListInput.js.map