(window["savedObjectsManagement_bundle_jsonpfunction"]=window["savedObjectsManagement_bundle_jsonpfunction"]||[]).push([[4],{97:function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);__webpack_require__.d(__webpack_exports__,"mountManagementSection",(function(){return mountManagementSection}));var external_osdSharedDeps_React_=__webpack_require__(10);var external_osdSharedDeps_React_default=__webpack_require__.n(external_osdSharedDeps_React_);var external_osdSharedDeps_ReactDom_=__webpack_require__(15);var external_osdSharedDeps_ReactDom_default=__webpack_require__.n(external_osdSharedDeps_ReactDom_);var external_osdSharedDeps_ReactRouterDom_=__webpack_require__(13);var external_osdSharedDeps_OsdI18nReact_=__webpack_require__(12);var external_osdSharedDeps_OsdI18n_=__webpack_require__(1);var external_osdSharedDeps_ElasticEui_=__webpack_require__(11);var lib=__webpack_require__(4);let allowedObjectTypes;const title=external_osdSharedDeps_OsdI18n_["i18n"].translate("savedObjectsManagement.objects.savedObjectsTitle",{defaultMessage:"Saved Objects"});const SavedObjectsEditionPage=Object(external_osdSharedDeps_React_["lazy"])(()=>Promise.all([__webpack_require__.e(1),__webpack_require__.e(3)]).then(__webpack_require__.bind(null,96)));const SavedObjectsTablePage=Object(external_osdSharedDeps_React_["lazy"])(()=>__webpack_require__.e(2).then(__webpack_require__.bind(null,95)));const mountManagementSection=async _ref=>{let{core:core,mountParams:mountParams,serviceRegistry:serviceRegistry}=_ref;const[coreStart,{data:data,uiActions:uiActions},pluginStart]=await core.getStartServices();const{element:element,history:history,setBreadcrumbs:setBreadcrumbs}=mountParams;if(allowedObjectTypes===undefined){allowedObjectTypes=await Object(lib["getAllowedTypes"])(coreStart.http)}coreStart.chrome.docTitle.change(title);const capabilities=coreStart.application.capabilities;const RedirectToHomeIfUnauthorized=_ref2=>{var _capabilities$managem,_capabilities$managem2,_capabilities$managem3;let{children:children}=_ref2;const allowed=(_capabilities$managem=capabilities===null||capabilities===void 0?void 0:(_capabilities$managem2=capabilities.management)===null||_capabilities$managem2===void 0?void 0:(_capabilities$managem3=_capabilities$managem2.opensearchDashboards)===null||_capabilities$managem3===void 0?void 0:_capabilities$managem3.objects)!==null&&_capabilities$managem!==void 0?_capabilities$managem:false;if(!allowed){coreStart.application.navigateToApp("home");return null}return children};external_osdSharedDeps_ReactDom_default.a.render(external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_OsdI18nReact_["I18nProvider"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ReactRouterDom_["Router"],{history:history},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ReactRouterDom_["Switch"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ReactRouterDom_["Route"],{path:"/:service/:id",exact:true},external_osdSharedDeps_React_default.a.createElement(RedirectToHomeIfUnauthorized,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_["Suspense"],{fallback:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiLoadingSpinner"],null)},external_osdSharedDeps_React_default.a.createElement(SavedObjectsEditionPage,{coreStart:coreStart,uiActionsStart:uiActions,serviceRegistry:serviceRegistry,setBreadcrumbs:setBreadcrumbs,history:history})))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ReactRouterDom_["Route"],{path:"/",exact:false},external_osdSharedDeps_React_default.a.createElement(RedirectToHomeIfUnauthorized,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_["Suspense"],{fallback:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiLoadingSpinner"],null)},external_osdSharedDeps_React_default.a.createElement(SavedObjectsTablePage,{coreStart:coreStart,dataStart:data,serviceRegistry:serviceRegistry,actionRegistry:pluginStart.actions,columnRegistry:pluginStart.columns,namespaceRegistry:pluginStart.namespaces,allowedTypes:allowedObjectTypes,setBreadcrumbs:setBreadcrumbs}))))))),element);return()=>{external_osdSharedDeps_ReactDom_default.a.unmountComponentAtNode(element)}}}}]);