"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.QuickSearchStatusBarContent = void 0;
const tslib_1 = require("tslib");
const React = tslib_1.__importStar(require("react"));
const react_redux_1 = require("react-redux");
const AdaptableContext_1 = require("../AdaptableContext");
const AdaptableFormControlTextClear_1 = require("../Components/Forms/AdaptableFormControlTextClear");
const QuickSearchRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/QuickSearchRedux"));
const QuickSearchStatusBarContent = () => {
    const text = (0, react_redux_1.useSelector)((state) => state.QuickSearch.QuickSearchText);
    const dispatch = (0, react_redux_1.useDispatch)();
    const adaptable = (0, AdaptableContext_1.useAdaptable)();
    const handleTextChange = React.useCallback((text) => dispatch(QuickSearchRedux.QuickSearchRun(text)), []);
    return (React.createElement(AdaptableFormControlTextClear_1.AdaptableFormControlTextClear, { onClick: (event) => event.stopPropagation(), type: "text", inputStyle: { padding: '2px 3px', width: 90 }, placeholder: adaptable.api.optionsApi.getQuickSearchOptions().quickSearchPlaceholder, value: text, OnTextChange: handleTextChange }));
};
exports.QuickSearchStatusBarContent = QuickSearchStatusBarContent;
