/*! Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one or more contributor license agreements. * Licensed under the Elastic License 2.0; you may not use this file except in compliance with the Elastic License 2.0. */!function(t){function e(e){for(var n,o,i=e[0],u=e[1],s=0,a=[];sr.i18n.translate("xpack.remoteClusters.appName",{defaultMessage:"Remote Clusters"})},i="/api/remote_clusters",u="sniff",s="proxy"},function(t,e){t.exports=__kbnSharedDeps__.KbnAnalytics},function(t,e,n){"use strict";let r,o,i,u,s,c,a,l;function d({links:t}){r=t.ccs.skippingDisconnectedClusters,o=t.elasticsearch.remoteClusters,i=t.elasticsearch.transportSettings,u=t.elasticsearch.remoteClustersProxy,s=t.elasticsearch.remoteClusersProxySettings,c=t.elasticsearch.remoteClustersOnPremSetupTrustWithCert,a=t.elasticsearch.remoteClustersOnPremSetupTrustWithApiKey,l=t.elasticsearch.remoteClustersCloudSetupTrust}n.d(e,"h",(function(){return r})),n.d(e,"g",(function(){return o})),n.d(e,"i",(function(){return i})),n.d(e,"e",(function(){return u})),n.d(e,"f",(function(){return s})),n.d(e,"d",(function(){return c})),n.d(e,"c",(function(){return a})),n.d(e,"a",(function(){return l})),n.d(e,"b",(function(){return d}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return u})),n.d(e,"b",(function(){return s}));var r=n(0);let o,i;function u(t){o=t,i={home:{text:r.i18n.translate("xpack.remoteClusters.listBreadcrumbTitle",{defaultMessage:"Remote Clusters"}),href:"/list"},add:{text:r.i18n.translate("xpack.remoteClusters.addBreadcrumbTitle",{defaultMessage:"Add"})},edit:{text:r.i18n.translate("xpack.remoteClusters.editBreadcrumbTitle",{defaultMessage:"Edit"})}}}function s(t,e){if(i[t])if("home"===t)o([i.home]);else{const n={text:i.home.text,href:`${i.home.href}${e}`};o([n,i[t]])}}},function(t,e,n){"use strict";n.d(e,"b",(function(){return u})),n.d(e,"c",(function(){return s})),n.d(e,"d",(function(){return c}));var r=n(3);n.d(e,"a",(function(){return r.METRIC_TYPE}));var o=n(8);let i;function u(t){i=t}function s(t,e){if(!i)return;const{reportUiCounter:n}=i;n(o.b,t,e)}function c(t,e){return t.then((t=>(s(r.METRIC_TYPE.COUNT,e),t)))}},function(t,e,n){"use strict";let r,o;function i(t,e){r=t,o=e}n.d(e,"c",(function(){return r})),n.d(e,"a",(function(){return o})),n.d(e,"b",(function(){return i}))},function(t,e,n){"use strict";n.d(e,"b",(function(){return r})),n.d(e,"a",(function(){return o})),n.d(e,"c",(function(){return i})),n.d(e,"f",(function(){return u})),n.d(e,"d",(function(){return s})),n.d(e,"e",(function(){return c})),n.d(e,"g",(function(){return a}));const r="remote_clusters",o="app_load",i="cluster_add",u="cluster_update",s="cluster_remove",c="cluster_remove_many",a="show_details_click"},function(t,e,n){"use strict";let r;function o(t){r=t}function i(t){r("management",{path:t})}n.d(e,"a",(function(){return o})),n.d(e,"b",(function(){return i}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return i})),n.d(e,"d",(function(){return s})),n.d(e,"c",(function(){return c})),n.d(e,"e",(function(){return a})),n.d(e,"b",(function(){return l}));var r=n(2);let o;function i(t){o=t}function u(t){return t?`${r.a}/${t}`:r.a}function s(t,e){return o.post(u(t),{body:JSON.stringify(e)})}function c(t,{asSystemRequest:e}={}){return o.get(u(t),{asSystemRequest:e})}function a(t,e){return o.put(u(t),{body:JSON.stringify(e)})}function l(t){return o.delete(u(t))}},function(t,e){t.exports=__kbnSharedDeps_npm__},function(t,e,n){n(13),__kbnBundles__.define("plugin/remoteClusters/public",n,14)},function(t,e,n){n.p=window.__kbnPublicPath__.remoteClusters},function(t,e,n){"use strict";n.r(e),n.d(e,"plugin",(function(){return p}));var r=n(1),o=n.n(r),i=n(0),u=n(2),s=n(5),c=n(4),a=n(10),l=n(6),d=n(7),f=n(9);class locator_RemoteClustersLocatorDefinition{constructor(t){o()(this,"id","REMOTE_CLUSTERS_LOCATOR"),o()(this,"getLocation",(async t=>{const e=await this.deps.managementAppLocator.getLocation({sectionId:"data",appId:"remote_clusters"});if("remoteClusters"===t.page)return{...e,path:e.path}})),this.deps=t}}class plugin_RemoteClustersUIPlugin{constructor(t){o()(this,"canUseApiKeyTrustModel",!1),o()(this,"licensingSubscription",void 0),this.initializerContext=t}setup({notifications:{toasts:t},http:e,getStartServices:r},{management:o,usageCollection:f,cloud:p,share:_}){const{ui:{enabled:b}}=this.initializerContext.config.get();return b&&(o.sections.section.data.registerApp({id:"remote_clusters",title:i.i18n.translate("xpack.remoteClusters.appTitle",{defaultMessage:"Remote Clusters"}),order:7,mount:async({element:o,setBreadcrumbs:i,history:_,theme$:b})=>{var m;const[h]=await r(),{chrome:{docTitle:g},i18n:{Context:C},docLinks:y,fatalErrors:v,executionContext:x}=h;g.change(u.b.getI18nName()),Object(s.a)(i),Object(c.b)(y),Object(l.b)(f),Object(d.b)(t,v),Object(a.a)(e);const S=Boolean(null==p?void 0:p.isCloudEnabled),O=null!==(m=null==p?void 0:p.baseUrl)&&void 0!==m?m:"",{renderApp:k}=await n.e(1).then(n.bind(null,72)),T=await k(o,C,{isCloudEnabled:S,cloudBaseUrl:O,executionContext:x,canUseAPIKeyTrustModel:this.canUseApiKeyTrustModel},_,b);return()=>{g.reset(),T()}}}),_.url.locators.create(new locator_RemoteClustersLocatorDefinition({managementAppLocator:o.locator}))),{isUiEnabled:b}}start({application:t},{licensing:e}){const{ui:{enabled:n}}=this.initializerContext.config.get();n&&Object(f.a)(t.navigateToApp),this.licensingSubscription=e.license$.subscribe((t=>{this.canUseApiKeyTrustModel=t.hasAtLeast("enterprise")}))}stop(){var t;null===(t=this.licensingSubscription)||void 0===t||t.unsubscribe()}}const p=t=>new plugin_RemoteClustersUIPlugin(t)},function(t,e){t.exports=__kbnSharedDeps__.React},function(t,e){t.exports=__kbnSharedDeps__.EmotionReact},function(t,e){t.exports=__kbnSharedDeps__.KbnI18nReact},function(t,e){t.exports=__kbnSharedDeps__.ElasticEui},function(t,e,n){n.r(e);var r=__kbnBundles__.get("plugin/kibanaReact/public");Object.defineProperties(e,Object.getOwnPropertyDescriptors(r))},function(t,e,n){n.r(e);var r=__kbnBundles__.get("plugin/esUiShared/public");Object.defineProperties(e,Object.getOwnPropertyDescriptors(r))},function(t,e){t.exports=__kbnSharedDeps__.ReactRouterDom},function(t,e){t.exports=__kbnSharedDeps__.ReactDom},function(t,e){t.exports=__kbnSharedDeps__.TsLib},function(t,e){t.exports=__kbnSharedDeps__.ReactRouterDomV5Compat},function(t,e){t.exports=__kbnSharedDeps__.Lodash}]);