"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const tslib_es6 = require("../../../node_modules/tslib/tslib.es6.js");
const Component = require("../../model/Component.js");
const Component$1 = require("../../view/Component.js");
const types = require("../../util/types.js");
const sourceManager = require("../../data/helper/sourceManager.js");
var DatasetModel = (
  /** @class */
  function(_super) {
    tslib_es6.__extends(DatasetModel2, _super);
    function DatasetModel2() {
      var _this = _super !== null && _super.apply(this, arguments) || this;
      _this.type = "dataset";
      return _this;
    }
    DatasetModel2.prototype.init = function(option, parentModel, ecModel) {
      _super.prototype.init.call(this, option, parentModel, ecModel);
      this._sourceManager = new sourceManager.SourceManager(this);
      sourceManager.disableTransformOptionMerge(this);
    };
    DatasetModel2.prototype.mergeOption = function(newOption, ecModel) {
      _super.prototype.mergeOption.call(this, newOption, ecModel);
      sourceManager.disableTransformOptionMerge(this);
    };
    DatasetModel2.prototype.optionUpdated = function() {
      this._sourceManager.dirty();
    };
    DatasetModel2.prototype.getSourceManager = function() {
      return this._sourceManager;
    };
    DatasetModel2.type = "dataset";
    DatasetModel2.defaultOption = {
      seriesLayoutBy: types.SERIES_LAYOUT_BY_COLUMN
    };
    return DatasetModel2;
  }(Component.default)
);
var DatasetView = (
  /** @class */
  function(_super) {
    tslib_es6.__extends(DatasetView2, _super);
    function DatasetView2() {
      var _this = _super !== null && _super.apply(this, arguments) || this;
      _this.type = "dataset";
      return _this;
    }
    DatasetView2.type = "dataset";
    return DatasetView2;
  }(Component$1.default)
);
function install(registers) {
  registers.registerComponentModel(DatasetModel);
  registers.registerComponentView(DatasetView);
}
exports.DatasetModel = DatasetModel;
exports.install = install;
