/**
 * FilterSelector Controller
 *
 * Used metadata:
 *
 *  - `directedFilterAttributes`: List of attribute names which should have rules
 *      already ready when using the filter tools. For WMS layers.
 *
 * Used functionalities:
 *
 *  - `preset_layer_filter`: Name of the layer (data source) that should be toggled in the filter tool upon
 *      loading an application.
 *      Note: although this is a list, only one can be defined.
 *  - `filterable_layers`: A list of layer names that can be filtered, if empty the component will be hidden.
 */
export class FilterSelectorController {
    /**
     * @param {angular.IScope} $scope Angular scope.
     * @param {angular.ITimeoutService} $timeout Angular timeout service.
     * @param {angular.gettext.gettextCatalog} gettextCatalog Gettext catalog.
     * @param {import('gmf/datasource/DataSourceBeingFiltered').DataSourceBeingFiltered} gmfDataSourceBeingFiltered
     *     The Gmf value service that determines the data source currently being filtered.
     * @param {import('gmf/datasource/gmfHelper').DatasourceHelper} gmfDataSourcesHelper Gmf data
     *     sources helper service.
     * @param {import('gmf/filters/SavedFilters').SavedFilter} gmfSavedFilters Gmf saved filters service.
     * @param {import('ngeo/filter/RuleHelper').RuleHelper} ngeoRuleHelper Ngeo rule helper service.
     * @ngdoc controller
     * @ngname GmfFilterselectorController
     */
    constructor($scope: angular.IScope, $timeout: angular.ITimeoutService, gettextCatalog: angular.gettext.gettextCatalog, gmfDataSourceBeingFiltered: import("gmf/datasource/DataSourceBeingFiltered").DataSourceBeingFiltered, gmfDataSourcesHelper: any, gmfSavedFilters: import("gmf/filters/SavedFilters").SavedFilter, ngeoRuleHelper: import("ngeo/filter/RuleHelper").RuleHelper);
    /**
     * @type {boolean}
     */
    active: boolean;
    /**
     * @type {?import('ol/Map').default}
     */
    map: import("ol/Map").default | null;
    /**
     * @type {?string}
     */
    toolGroup: string | null;
    /**
     * @type {angular.ITimeoutService}
     * @private
     */
    private timeout_;
    /**
     * @type {angular.gettext.gettextCatalog}
     * @private
     */
    private gettextCatalog_;
    /**
     * The data source that can either be selected from the list or have
     * its value set from an external source (for example: the layertree)
     * and that requires to be ready before it can be filtered.
     *
     * @type {import('gmf/datasource/DataSourceBeingFiltered').DataSourceBeingFiltered}
     */
    gmfDataSourceBeingFiltered: import("gmf/datasource/DataSourceBeingFiltered").DataSourceBeingFiltered;
    /**
     * @type {import('gmf/datasource/gmfHelper').DatasourceHelper}
     * @private
     */
    private gmfDataSourcesHelper_;
    /**
     * @type {import('gmf/filters/SavedFilters').SavedFilter}
     */
    gmfSavedFilters: import("gmf/filters/SavedFilters").SavedFilter;
    saveFilterManageModalShown: boolean;
    /**
     * @type {import('ngeo/store/user').User}
     * @private
     */
    private gmfUser_;
    /**
     * @type {Subscription[]}
     * @private
     */
    private subscriptions_;
    /**
     * @type {import('ngeo/map/FeatureOverlay').FeatureOverlay}
     */
    featureOverlay: import("ngeo/map/FeatureOverlay").FeatureOverlay;
    /**
     * @type {import('ngeo/filter/RuleHelper').RuleHelper}
     * @private
     */
    private ngeoRuleHelper_;
    /**
     * @type {boolean}
     */
    aRuleIsActive: boolean;
    /**
     * @type {?import('ngeo/rule/Rule').default[]}
     */
    customRules: import("ngeo/rule/Rule").default[] | null;
    /**
     * @type {?import('ngeo/rule/Rule').default[]}
     */
    directedRules: import("ngeo/rule/Rule").default[] | null;
    /**
     * @type {import('gmf/datasource/OGC').default[]}
     */
    filtrableDataSources: import("gmf/datasource/OGC").default[];
    /**
     * @type {?string[]}
     * @private
     */
    private filtrableLayerNodeNames_;
    /**
     * @type {import('ol/Collection').default<import('gmf/datasource/OGC').default>}
     * @private
     */
    private gmfDataSources_;
    /**
     * @type {import('ol/events').EventsKey[]}
     * @private
     */
    private listenerKeys_;
    /**
     * The data source ready to be filtered, after it has been selected and
     * prepared.
     *
     * @type {?import('gmf/datasource/OGC').default}
     */
    readyDataSource: import("gmf/datasource/OGC").default | null;
    /**
     * @type {RuleCache}
     * @private
     */
    private ruleCache_;
    /**
     * @type {boolean}
     */
    saveFilterSaveModalShown: boolean;
    saveFilterName: string;
    /**
     * @type {boolean}
     */
    enableDataSourceRegistration_: boolean;
    /**
     * The name of the data source that should be automatically selected
     * by this component.
     *
     * @type {?string}
     * @private
     */
    private defaultFiltrableDataSourceName_;
    /**
     * Clear subscriptions.
     */
    $onDestroy(): void;
    /**
     * @private
     * @hidden
     */
    private handleGmfUserFunctionalitiesChange_;
    /**
     * @private
     * @hidden
     */
    private toggleDataSourceRegistration_;
    /**
     * @param {boolean} register Whether register the data sources or not.
     * @private
     * @hidden
     */
    private handleEnableDataSourceRegistrationChange_;
    /**
     * Called when a data source is added to the collection of ngeo data sources.
     * If the data source is 'valid', add it to the list of filtrable data
     * sources.
     *
     * @param {Event|import('ol/events/Event').default} evt Collection event.
     * @private
     * @hidden
     */
    private handleDataSourcesAdd_;
    /**
     * Called when a data source is removed from the collection of ngeo data
     * sources. If the data source is 'valid', remove it from the list of
     * filtrable data sources.
     *
     * @param {Event|import('ol/events/Event').default} evt Collection event.
     * @private
     * @hidden
     */
    private handleDataSourcesRemove_;
    /**
     * Register a data source if filtrable.  If it's the first time that the
     * data source is about to be registered, then the `filtrable` property
     * is set. Otherwise, it's used.
     *
     * @param {import('gmf/datasource/OGC').default} dataSource Data source
     * @private
     * @hidden
     */
    private registerDataSource_;
    /**
     * Unregister a data source if it's filtrable. Also, if it's the one
     * that was currently selected, deselect it.
     *
     * @param {import('gmf/datasource/OGC').default} dataSource Data source
     * @private
     * @hidden
     */
    private unregisterDataSource_;
    /**
     * Determines whether the data source is valid for addition (or removal) to
     * the list of filtrable data sources or not.
     *
     * To be filtrable, the data source must:
     *
     *  1) have its name in the list of filtrable layer node names
     *  2) support WFS
     *  3) have only one wfsLayers defined
     *  4) the ogcLayer must be queryable
     *
     * If 1) is true but not any of the others, then the server has not been
     * configured properly. In this case, a warning notification can be shown.
     *
     * @param {import('gmf/datasource/OGC').default} dataSource GMF data source object
     * @param {boolean} [opt_notify] Whether to show a warning notification or not
     *     in case of a data source that has its name is in the list of
     *     filtrable layer node names but it doesn't match the other requirements.
     *     Defaults to `true.`
     * @returns {boolean} Whether the data source is valid to add to the list or
     *     not.
     * @private
     * @hidden
     */
    private isDataSourceFiltrable_;
    /**
     * @param {?import('gmf/datasource/OGC').default} dataSource Newly selected data source object.
     * @private
     * @hidden
     */
    private handleSelectedDataSourceChange_;
    /**
     * @param {import('ngeo/datasource/DataSource').default} dataSource Data source.
     * @returns {?RuleCacheItem} Rule cache item.
     * @private
     * @hidden
     */
    private getRuleCacheItem_;
    /**
     * @param {import('ngeo/datasource/DataSource').default} dataSource Data source.
     * @param {RuleCacheItem} item Rule cache item.
     * @private
     * @hidden
     */
    private setRuleCacheItem_;
    /**
     * @hidden
     */
    saveFilterShowModal(): void;
    /**
     * @hidden
     */
    saveFilterSave(): void;
    /**
     * Load a saved filter item, replacing the current rules.
     *
     * @param {import('gmf/filters/SavedFilters').SavedFilterItem} filterItem Filter item.
     * @hidden
     */
    saveFilterLoadItem(filterItem: import("gmf/filters/SavedFilters").SavedFilterItem): void;
    /**
     * @hidden
     */
    saveFilterManage(): void;
    /**
     * Remove a saved filter item.
     *
     * @param {import('gmf/filters/SavedFilters').SavedFilterItem} item Filter item.
     * @hidden
     */
    saveFilterRemoveItem(item: import("gmf/filters/SavedFilters").SavedFilterItem): void;
}
export namespace FilterSelectorController {
    let $inject: string[];
}
export default myModule;
export type RuleCache = {
    [x: number]: RuleCacheItem;
};
export type RuleCacheItem = {
    customRules: import("ngeo/rule/Rule").default[];
    directedRules: import("ngeo/rule/Rule").default[];
};
import angular from 'angular';
/**
 * @type {angular.IModule}
 * @hidden
 */
declare const myModule: angular.IModule;
