Liferay.Loader.define("@liferay/search-experiences-web@3.0.7/sxp_blueprint_admin/js/edit_sxp_blueprint/query_builder_tab/index",["module","exports","require","@frontend-taglib-clay$clayui/layout","@frontend-taglib-clay$clayui/nav","liferay!frontend-js-react-web$prop-types","liferay!frontend-js-react-web$react","../../utils/constants","../../utils/sessionStorage","./QuerySXPElements","./QuerySettings"],(function(e,t,n){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=S(n("@frontend-taglib-clay$clayui/layout")),r=n("@frontend-taglib-clay$clayui/nav"),l=(n("liferay!frontend-js-react-web$prop-types"),function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=E();if(t&&t.has(e))return t.get(e);var n={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var l=a?Object.getOwnPropertyDescriptor(e,r):null;l&&(l.get||l.set)?Object.defineProperty(n,r,l):n[r]=e[r]}n.default=e,t&&t.set(e,n);return n}(n("liferay!frontend-js-react-web$react"))),i=n("../../utils/constants"),s=n("../../utils/sessionStorage"),o=S(n("./QuerySXPElements")),u=S(n("./QuerySettings"));function E(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return E=function(){return e},e}function S(e){return e&&e.__esModule?e:{default:e}}const e={QUERY_SETTINGS:"querySettings",QUERY_SXP_ELEMENTS:"querySXPElements"};function c({applyIndexerClauses:t,clauseContributorsList:n=[],elementInstances:E,entityJSON:S,errors:c=[],frameworkConfig:d={},isSubmitting:f,indexFields:y,onApplyIndexerClausesChange:_,onBlur:p,onChange:b,onDeleteSXPElement:g,onFetchSearchableTypes:m,onFrameworkConfigChange:C,searchableTypes:T=[],setFieldTouched:N,setFieldValue:R,openSidebar:I,setOpenSidebar:h,touched:L=[]}){const[P,D]=(0,l.useState)(e.QUERY_SXP_ELEMENTS);(0,l.useEffect)((()=>{P!==e.QUERY_SXP_ELEMENTS||I||"open"!==sessionStorage.getItem(s.SESSION_IDS.ADD_SXP_ELEMENT_SIDEBAR)||h(i.SIDEBARS.ADD_SXP_ELEMENT)}),[P,I,h]);const X=e=>(t=I!==e)=>{t?h(e):I===e&&h("")},A=t=>()=>{D(t),(t===e.QUERY_SXP_ELEMENTS&&I===i.SIDEBARS.CLAUSE_CONTRIBUTORS||t===e.QUERY_SXP_ELEMENTS&&I===i.SIDEBARS.INDEXER_CLAUSES||t===e.QUERY_SETTINGS&&I===i.SIDEBARS.ADD_SXP_ELEMENT)&&h("")};return l.default.createElement(a.default.ContainerFluid,{className:"builder query-builder-tab",size:"xl"},l.default.createElement("div",{className:"builder-content-shift"},l.default.createElement(a.default.Row,null,l.default.createElement(a.default.Col,{md:3,sm:12},l.default.createElement(r.ClayVerticalNav,{items:[{active:P===e.QUERY_SXP_ELEMENTS,label:Liferay.Language.get("query-elements"),onClick:A(e.QUERY_SXP_ELEMENTS)},{active:P===e.QUERY_SETTINGS,label:Liferay.Language.get("query-settings"),onClick:A(e.QUERY_SETTINGS)}]})),l.default.createElement(a.default.Col,{md:9,sm:12},l.default.createElement("div",{className:"vertical-nav-content-wrapper"},P===e.QUERY_SXP_ELEMENTS&&l.default.createElement(o.default,{elementInstances:E,entityJSON:S,errors:c,indexFields:y,isSubmitting:f,onBlur:p,onChange:b,onChangeAddSXPElementVisibility:X(i.SIDEBARS.ADD_SXP_ELEMENT),onDeleteSXPElement:g,searchableTypes:T,setFieldTouched:N,setFieldValue:R,touched:L}),P===e.QUERY_SETTINGS&&l.default.createElement(u.default,{applyIndexerClauses:t,clauseContributorsList:n,frameworkConfig:d,onApplyIndexerClausesChange:_,onChangeClauseContributorsVisibility:X(i.SIDEBARS.CLAUSE_CONTRIBUTORS),onChangeIndexerClausesVisibility:X(i.SIDEBARS.INDEXER_CLAUSES),onFetchSearchableTypes:m,onFrameworkConfigChange:C,searchableTypes:T}))))))}var d=l.default.memo(c);t.default=d}}));
//# sourceMappingURL=index.js.map