export class DataWrapperService {
    init(grid) {
        this._grid = grid;
        if (grid.hasDataView()) {
            this._dataView = grid.getData();
        }
    }
    getDataItem(row) {
        return this._dataView?.getItem(row) ?? this._grid.getDataItem(row);
    }
    getDataItems() {
        return this._dataView?.getItems() ?? this._grid.getData();
    }
    getDataLength() {
        return this._dataView?.getItemCount() ?? this._grid.getDataLength();
    }
    setDataItems(items) {
        this._dataView?.setItems(items) ?? this._grid.setData(items);
    }
}
//# sourceMappingURL=dataWrapperService.js.map