import * as QuickSearchRedux from '../../Redux/ActionsReducers/QuickSearchRedux';
import * as InternalRedux from '../../Redux/ActionsReducers/InternalRedux';
import * as ModuleConstants from '../../Utilities/Constants/ModuleConstants';
import { ApiBase } from './ApiBase';
export class QuickSearchApiImpl extends ApiBase {
    getQuickSearchState() {
        return this.getAdaptableState().QuickSearch;
    }
    runQuickSearch(quickSearchText) {
        this.dispatchAction(QuickSearchRedux.QuickSearchRun(quickSearchText));
    }
    clearQuickSearch() {
        this.dispatchAction(QuickSearchRedux.QuickSearchRun(''));
    }
    gotoNextMatch() {
        this.getAdaptableApi().agGridApi.findNext();
    }
    gotoPreviousMatch() {
        this.getAdaptableApi().agGridApi.findPrevious();
    }
    getQuickSearchValue() {
        return this.getQuickSearchState().QuickSearchText;
    }
    getQuickSearchStyle() {
        return this.getQuickSearchState().Style;
    }
    getQuickSearchTextMatchStyle() {
        return this.getQuickSearchState().TextMatchStyle;
    }
    getQuickSearchCurrentTextMatchStyle() {
        return this.getQuickSearchState().CurrentTextMatchStyle;
    }
    setQuickSearchStyle(style) {
        this.dispatchAction(QuickSearchRedux.QuickSearchSetStyle(style));
    }
    openQuickSearchSettingsPanel() {
        this.showModulePopup(ModuleConstants.QuickSearchModuleId);
    }
    showFloatingQuickSearch() {
        this.dispatchAction(InternalRedux.QuickSearchFloatingVisibility(true));
    }
    hideFloatingQuickSearch() {
        this.dispatchAction(InternalRedux.QuickSearchFloatingVisibility(false));
    }
}
