/**
 * DevExtreme (cjs/ui/list/ui.list.edit.search.js)
 * Version: 23.2.6 (build 24140-0112)
 * Build date: Sun May 19 2024
 *
 * Copyright (c) 2012 - 2024 Developer Express Inc. ALL RIGHTS RESERVED
 * Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/
 */
"use strict";
exports.default = void 0;
var _uiList = _interopRequireDefault(require("./ui.list.edit"));
var _ui = _interopRequireDefault(require("../widget/ui.search_box_mixin"));

function _interopRequireDefault(obj) {
    return obj && obj.__esModule ? obj : {
        default: obj
    }
}
const ListSearch = _uiList.default.inherit(_ui.default).inherit({
    _addWidgetPrefix: function(className) {
        return "dx-list-" + className
    },
    _getCombinedFilter: function() {
        const dataController = this._dataController;
        const storeLoadOptions = {
            filter: dataController.filter()
        };
        dataController.addSearchFilter(storeLoadOptions);
        const filter = storeLoadOptions.filter;
        return filter
    },
    _initDataSource: function() {
        const value = this.option("searchValue");
        const expr = this.option("searchExpr");
        const mode = this.option("searchMode");
        this.callBase();
        const dataController = this._dataController;
        value && value.length && dataController.searchValue(value);
        mode.length && dataController.searchOperation(_ui.default.getOperationBySearchMode(mode));
        expr && dataController.searchExpr(expr)
    }
});
var _default = ListSearch;
exports.default = _default;
module.exports = exports.default;
module.exports.default = exports.default;
