(window["managementOverview_bundle_jsonpfunction"]=window["managementOverview_bundle_jsonpfunction"]||[]).push([[1],{11:function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});var tslib_1=__webpack_require__(10);var react_1=__webpack_require__(6);var useIsomorphicLayoutEffect_1=tslib_1.__importDefault(__webpack_require__(12));function useObservable(observable$,initialValue){var _a=react_1.useState(initialValue),value=_a[0],update=_a[1];useIsomorphicLayoutEffect_1.default((function(){var s=observable$.subscribe(update);return function(){return s.unsubscribe()}}),[observable$]);return value}exports.default=useObservable},12:function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});var react_1=__webpack_require__(6);var useIsomorphicLayoutEffect=typeof window!=="undefined"?react_1.useLayoutEffect:react_1.useEffect;exports.default=useIsomorphicLayoutEffect},13:function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);__webpack_require__.d(__webpack_exports__,"ManagementOverviewWrapper",(function(){return ManagementOverviewWrapper}));__webpack_require__.d(__webpack_exports__,"renderApp",(function(){return renderApp}));var external_osdSharedDeps_ReactDom_=__webpack_require__(8);var external_osdSharedDeps_ReactDom_default=__webpack_require__.n(external_osdSharedDeps_ReactDom_);var external_osdSharedDeps_OsdI18nReact_=__webpack_require__(9);var external_osdSharedDeps_React_=__webpack_require__(6);var external_osdSharedDeps_React_default=__webpack_require__.n(external_osdSharedDeps_React_);var external_osdSharedDeps_ElasticEui_=__webpack_require__(7);var useObservable=__webpack_require__(11);var useObservable_default=__webpack_require__.n(useObservable);var public_=__webpack_require__(1);function OverviewCard(props){const{id:id,title:title,description:description,onClick:onClick}=props;return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCard"],{layout:"horizontal",titleSize:"xs",title:title,description:description,onClick:onClick,"data-test-subj":"link-".concat(id.toLowerCase()),titleElement:"h3"})}function _extends(){_extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source){if(Object.prototype.hasOwnProperty.call(source,key)){target[key]=source[key]}}}return target};return _extends.apply(this,arguments)}function ManagementOverviewWrapper(props){const{application:application,overviewApps:overviewApps}=props;const applications=useObservable_default()(application.applications$);const availableApps=Object(external_osdSharedDeps_React_["useMemo"])(()=>overviewApps===null||overviewApps===void 0?void 0:overviewApps.filter(overviewApp=>{const app=applications===null||applications===void 0?void 0:applications.get(overviewApp.id);return app&&app.navLinkStatus!==public_["AppNavLinkStatus"].hidden}),[applications,overviewApps]);return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPage"],{restrictWidth:1200},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPageBody"],{component:"main"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiTitle"],{size:"l"},external_osdSharedDeps_React_default.a.createElement("h1",null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_OsdI18nReact_["FormattedMessage"],{id:"management.overview.overviewTitle",defaultMessage:"Overview"}))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGrid"],{columns:3},availableApps===null||availableApps===void 0?void 0:availableApps.map(app=>external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{key:app.id},external_osdSharedDeps_React_default.a.createElement(OverviewCard,_extends({},app,{onClick:()=>{application.navigateToApp(app.id)}})))))))}function renderApp(_ref,overviewApps,element){let{application:application,chrome:chrome}=_ref;external_osdSharedDeps_ReactDom_default.a.render(external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_OsdI18nReact_["I18nProvider"],null,external_osdSharedDeps_React_default.a.createElement(ManagementOverviewWrapper,{application:application,overviewApps:overviewApps})),element);return()=>{chrome.docTitle.reset();external_osdSharedDeps_ReactDom_default.a.unmountComponentAtNode(element)}}}}]);