"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.DataWrapperService = void 0;
class DataWrapperService {
    init(grid) {
        this._grid = grid;
        if (grid.hasDataView()) {
            this._dataView = grid.getData();
        }
    }
    getDataItem(row) {
        return this._dataView ? this._dataView.getItem(row) : this._grid.getDataItem(row);
    }
    getDataItems() {
        return this._dataView ? this._dataView.getItems() : this._grid.getData();
    }
    getDataLength() {
        return this._dataView ? this._dataView.getItemCount() : this._grid.getDataLength();
    }
    setDataItems(items) {
        this._dataView ? this._dataView.setItems(items) : this._grid.setData(items);
    }
}
exports.DataWrapperService = DataWrapperService;
//# sourceMappingURL=dataWrapperService.js.map