/**
 * DevExtreme (esm/__internal/ui/list/m_list.edit.search.js)
 * Version: 23.2.9 (build 24294-0112)
 * Build date: Sun Oct 20 2024
 *
 * Copyright (c) 2012 - 2024 Developer Express Inc. ALL RIGHTS RESERVED
 * Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/
 */
import searchBoxMixin from "../../../ui/widget/ui.search_box_mixin";
import ListEdit from "./m_list.edit";
var ListSearch = ListEdit.inherit(searchBoxMixin).inherit({
    _addWidgetPrefix: className => "dx-list-".concat(className),
    _getCombinedFilter() {
        var dataController = this._dataController;
        var storeLoadOptions = {
            filter: dataController.filter()
        };
        dataController.addSearchFilter(storeLoadOptions);
        var {
            filter: filter
        } = storeLoadOptions;
        return filter
    },
    _initDataSource() {
        var value = this.option("searchValue");
        var expr = this.option("searchExpr");
        var mode = this.option("searchMode");
        this.callBase();
        var dataController = this._dataController;
        value && value.length && dataController.searchValue(value);
        mode.length && dataController.searchOperation(searchBoxMixin.getOperationBySearchMode(mode));
        expr && dataController.searchExpr(expr)
    }
});
export default ListSearch;
