"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.QuickSearchApiImpl = void 0;
const tslib_1 = require("tslib");
const QuickSearchRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/QuickSearchRedux"));
const InternalRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/InternalRedux"));
const ModuleConstants = tslib_1.__importStar(require("../../Utilities/Constants/ModuleConstants"));
const ApiBase_1 = require("./ApiBase");
class QuickSearchApiImpl extends ApiBase_1.ApiBase {
    getQuickSearchState() {
        return this.getAdaptableState().QuickSearch;
    }
    runQuickSearch(quickSearchText) {
        this.dispatchAction(QuickSearchRedux.QuickSearchRun(quickSearchText));
    }
    clearQuickSearch() {
        this.dispatchAction(QuickSearchRedux.QuickSearchRun(''));
    }
    getQuickSearchValue() {
        return this.getQuickSearchState().QuickSearchText;
    }
    getQuickSearchStyle() {
        return this.getQuickSearchState().Style;
    }
    setQuickSearchStyle(style) {
        this.dispatchAction(QuickSearchRedux.QuickSearchSetStyle(style));
    }
    openQuickSearchSettingsPanel() {
        this.showModulePopup(ModuleConstants.QuickSearchModuleId);
    }
    showFloatingQuickSearch() {
        this.dispatchAction(InternalRedux.QuickSearchFloatingVisibility(true));
    }
    hideFloatingQuickSearch() {
        this.dispatchAction(InternalRedux.QuickSearchFloatingVisibility(false));
    }
}
exports.QuickSearchApiImpl = QuickSearchApiImpl;
