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;
    }
    getQuickSearchCellMatchStyle() {
        return this.getQuickSearchState().CellMatchStyle;
    }
    getQuickSearchTextMatchStyle() {
        return this.getQuickSearchState().TextMatchStyle;
    }
    getQuickSearchCurrentTextMatchStyle() {
        return this.getQuickSearchState().CurrentTextMatchStyle;
    }
    setQuickSearchCellMatchStyle(style) {
        this.dispatchAction(QuickSearchRedux.QuickSearchSetCellMatchingStyle(style));
    }
    openQuickSearchSettingsPanel() {
        this.showModulePopup(ModuleConstants.QuickSearchModuleId);
    }
    showFloatingQuickSearch() {
        this.dispatchAction(InternalRedux.QuickSearchFloatingVisibility(true));
    }
    hideFloatingQuickSearch() {
        this.dispatchAction(InternalRedux.QuickSearchFloatingVisibility(false));
    }
}
