/**
 * DevExtreme (cjs/ui/tree_list/ui.tree_list.grid_view.js)
 * Version: 22.1.7 (build 23032-0308)
 * Build date: Wed Feb 01 2023
 *
 * Copyright (c) 2012 - 2023 Developer Express Inc. ALL RIGHTS RESERVED
 * Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/
 */
"use strict";
var _uiTree_list = _interopRequireDefault(require("./ui.tree_list.core"));
var _uiGrid_core = require("../grid_core/ui.grid_core.grid_view");
var _common = require("../../core/utils/common");

function _interopRequireDefault(obj) {
    return obj && obj.__esModule ? obj : {
        default: obj
    }
}
var GridView = _uiGrid_core.gridViewModule.views.gridView.inherit({
    _getWidgetAriaLabel: function() {
        return "dxTreeList-ariaTreeList"
    },
    _getTableRoleName: function() {
        return "treegrid"
    }
});
_uiTree_list.default.registerModule("gridView", {
    defaultOptions: _uiGrid_core.gridViewModule.defaultOptions,
    controllers: _uiGrid_core.gridViewModule.controllers,
    views: {
        gridView: GridView
    },
    extenders: {
        controllers: {
            resizing: {
                _synchronizeColumns: function() {
                    var _this = this;
                    var wordWrap = this.option("wordWrapEnabled");
                    if (wordWrap) {
                        this._toggleContentMinHeight(true)
                    }
                    this.callBase(arguments);
                    if (wordWrap) {
                        (0, _common.deferUpdate)((function() {
                            (0, _common.deferRender)((function() {
                                (0, _common.deferUpdate)((function() {
                                    _this._toggleContentMinHeight(false)
                                }))
                            }))
                        }))
                    }
                },
                _toggleBestFitMode: function(isBestFit) {
                    this.callBase(isBestFit);
                    var $rowsTable = this._rowsView.getTableElement();
                    $rowsTable.find(".dx-treelist-cell-expandable").toggleClass(this.addWidgetPrefix("best-fit"), isBestFit)
                }
            }
        }
    }
});
