"use strict";

exports.__esModule = true;
exports.default = void 0;
var _chartControls = require("@superset-ui/chart-controls");
var _core = require("@superset-ui/core");
var _columns = require("./controls/columns");
var _groupBy = require("./controls/groupBy");
var _handlebarTemplate = require("./controls/handlebarTemplate");
var _includeTime = require("./controls/includeTime");
var _limits = require("./controls/limits");
var _metrics = require("./controls/metrics");
var _orderBy = require("./controls/orderBy");
var _pagination = require("./controls/pagination");
var _queryMode = require("./controls/queryMode");
var _style = require("./controls/style");
function _extends() { _extends = Object.assign ? Object.assign.bind() : 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); } /**
                                                                                                                                                                                                                                                                                                                                                     * Licensed to the Apache Software Foundation (ASF) under one
                                                                                                                                                                                                                                                                                                                                                     * or more contributor license agreements.  See the NOTICE file
                                                                                                                                                                                                                                                                                                                                                     * distributed with this work for additional information
                                                                                                                                                                                                                                                                                                                                                     * regarding copyright ownership.  The ASF licenses this file
                                                                                                                                                                                                                                                                                                                                                     * to you under the Apache License, Version 2.0 (the
                                                                                                                                                                                                                                                                                                                                                     * "License"); you may not use this file except in compliance
                                                                                                                                                                                                                                                                                                                                                     * with the License.  You may obtain a copy of the License at
                                                                                                                                                                                                                                                                                                                                                     *
                                                                                                                                                                                                                                                                                                                                                     *   http://www.apache.org/licenses/LICENSE-2.0
                                                                                                                                                                                                                                                                                                                                                     *
                                                                                                                                                                                                                                                                                                                                                     * Unless required by applicable law or agreed to in writing,
                                                                                                                                                                                                                                                                                                                                                     * software distributed under the License is distributed on an
                                                                                                                                                                                                                                                                                                                                                     * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
                                                                                                                                                                                                                                                                                                                                                     * KIND, either express or implied.  See the License for the
                                                                                                                                                                                                                                                                                                                                                     * specific language governing permissions and limitations
                                                                                                                                                                                                                                                                                                                                                     * under the License.
                                                                                                                                                                                                                                                                                                                                                     */
var config = {
  controlPanelSections: [_chartControls.sections.genericTime, {
    label: (0, _core.t)('Query'),
    expanded: true,
    controlSetRows: [[_queryMode.queryModeControlSetItem], [_groupBy.groupByControlSetItem], [_metrics.metricsControlSetItem, _columns.allColumnsControlSetItem], [_metrics.percentMetricsControlSetItem], [_limits.timeSeriesLimitMetricControlSetItem, _orderBy.orderByControlSetItem], [_orderBy.orderDescendingControlSetItem], _pagination.serverPaginationControlSetRow, [_limits.rowLimitControlSetItem, _pagination.serverPageLengthControlSetItem], [_includeTime.includeTimeControlSetItem], [_metrics.showTotalsControlSetItem], ['adhoc_filters'], [{
      name: 'cssclass',
      config: {
        type: 'TextControl',
        label: (0, _core.t)('Common CSS class'),
        renderTrigger: true,
        description: (0, _core.t)('Common CSS class for parent elem')
      }
    }]]
  }, {
    label: (0, _core.t)('Options'),
    expanded: true,
    controlSetRows: [[_handlebarTemplate.handlebarsTemplateControlSetItem], [_style.styleControlSetItem]]
  }],
  formDataOverrides: formData => _extends({}, formData, {
    groupby: (0, _chartControls.getStandardizedControls)().popAllColumns(),
    metrics: (0, _chartControls.getStandardizedControls)().popAllMetrics()
  })
};
var _default = config;
exports.default = _default;