"use strict";
Object.defineProperty(exports, "__esModule", {
    value: true
});
Object.defineProperty(exports, "default", {
    enumerable: true,
    get: function() {
        return Clone;
    }
});
const _event = /*#__PURE__*/ _interop_require_default(require("../event"));
const _base = /*#__PURE__*/ _interop_require_default(require("./_base"));
function _interop_require_default(obj) {
    return obj && obj.__esModule ? obj : {
        default: obj
    };
}
class Clone extends _base.default {
    /**
   * @param {HTMLTableElement} table Main table.
   * @param {SettingsPure|Settings} settings The Walkontable settings.
   * @param {WalkontableCloneOptions} clone Clone data.
   */ constructor(table, settings, clone){
        super(table, settings);
        const facadeGetter = this.wtSettings.getSetting('facade', this);
        this.cloneSource = clone.source;
        this.cloneOverlay = clone.overlay;
        this.wtTable = this.cloneOverlay.createTable(this.getTableDao(), facadeGetter, this.domBindings, this.wtSettings);
        this.wtViewport = clone.viewport;
        this.selectionManager = clone.selectionManager;
        this.wtEvent = new _event.default(facadeGetter, this.domBindings, this.wtSettings, this.eventManager, this.wtTable, this.selectionManager, clone.event);
        this.findOriginalHeaders();
    }
}
