'use strict';

var tslib_es6 = require('../../../../../../tslib@2.3.0/node_modules/tslib/tslib.es6.js');
var Component = require('../../model/Component.js');
var Component$1 = require('../../view/Component.js');
var types = require('../../util/types.js');
var sourceManager = require('../../data/helper/sourceManager.js');

var DatasetModel = /** @class */function (_super) {
  tslib_es6.__extends(DatasetModel, _super);
  function DatasetModel() {
    var _this = _super !== null && _super.apply(this, arguments) || this;
    _this.type = 'dataset';
    return _this;
  }
  DatasetModel.prototype.init = function (option, parentModel, ecModel) {
    _super.prototype.init.call(this, option, parentModel, ecModel);
    this._sourceManager = new sourceManager.SourceManager(this);
    sourceManager.disableTransformOptionMerge(this);
  };
  DatasetModel.prototype.mergeOption = function (newOption, ecModel) {
    _super.prototype.mergeOption.call(this, newOption, ecModel);
    sourceManager.disableTransformOptionMerge(this);
  };
  DatasetModel.prototype.optionUpdated = function () {
    this._sourceManager.dirty();
  };
  DatasetModel.prototype.getSourceManager = function () {
    return this._sourceManager;
  };
  DatasetModel.type = 'dataset';
  DatasetModel.defaultOption = {
    seriesLayoutBy: types.SERIES_LAYOUT_BY_COLUMN
  };
  return DatasetModel;
}(Component.default);
var DatasetView = /** @class */function (_super) {
  tslib_es6.__extends(DatasetView, _super);
  function DatasetView() {
    var _this = _super !== null && _super.apply(this, arguments) || this;
    _this.type = 'dataset';
    return _this;
  }
  DatasetView.type = 'dataset';
  return DatasetView;
}(Component$1.default);
function install(registers) {
  registers.registerComponentModel(DatasetModel);
  registers.registerComponentView(DatasetView);
}

exports.DatasetModel = DatasetModel;
exports.install = install;
