"use strict";(self["alertingDashboards_bundle_jsonpfunction"]=self["alertingDashboards_bundle_jsonpfunction"]||[]).push([["19"],{7824:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.r(__webpack_exports__);__webpack_require__.d(__webpack_exports__,{"default":()=>query_editor_extensions});var _object_without_properties=__webpack_require__(61227);var jsx_runtime=__webpack_require__(31085);var external_osdSharedDeps_React_=__webpack_require__(46933);var external_osdSharedDeps_React_default=__webpack_require__.n(external_osdSharedDeps_React_);var query_editor_extension=__webpack_require__(66285);var createOrGetExtensionContainer=function(param){var extensionConfigId=param.extensionConfigId,containerName=param.containerName,parentContainer=param.parentContainer;var extensionId="".concat(containerName,"-").concat(extensionConfigId);var extensionContainer=document.getElementById(extensionId);if(!extensionContainer){extensionContainer=document.createElement("div");extensionContainer.className="".concat(containerName," ").concat(containerName,"__").concat(extensionConfigId);extensionContainer.id=extensionId;parentContainer===null||parentContainer===void 0?void 0:parentContainer.appendChild(extensionContainer)}return extensionContainer};var QueryEditorExtensions=external_osdSharedDeps_React_default().memo(function(props){var configMap=props.configMap,componentContainer=props.componentContainer,bannerContainer=props.bannerContainer,bottomPanelContainer=props.bottomPanelContainer,queryControlsContainer=props.queryControlsContainer,dependencies=(0,_object_without_properties._)(props,["configMap","componentContainer","bannerContainer","bottomPanelContainer","queryControlsContainer"]);var sortedConfigs=(0,external_osdSharedDeps_React_.useMemo)(function(){if(!configMap||Object.keys(configMap).length===0)return[];return Object.values(configMap).sort(function(a,b){return a.order-b.order})},[configMap]);return(0,jsx_runtime.jsx)(jsx_runtime.Fragment,{children:sortedConfigs.map(function(config){var extensionComponentContainer=createOrGetExtensionContainer({extensionConfigId:config.id,containerName:"osdQueryEditorExtensionComponent",parentContainer:componentContainer});var extensionQueryControlsContainer=createOrGetExtensionContainer({extensionConfigId:config.id,containerName:"osdQueryEditorExtensionQueryControls",parentContainer:queryControlsContainer});var extensionActionBarContainer=createOrGetExtensionContainer({extensionConfigId:config.id,containerName:"osdQueryEditorExtensionActionBarContainer",parentContainer:document.getElementById(query_editor_extension.d)});return(0,jsx_runtime.jsx)(query_editor_extension.$,{config:config,dependencies:dependencies,componentContainer:extensionComponentContainer,bannerContainer:bannerContainer,bottomPanelContainer:bottomPanelContainer,queryControlsContainer:extensionQueryControlsContainer,actionBarContainer:extensionActionBarContainer},config.id)})})});const query_editor_extensions=QueryEditorExtensions}}]);