"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const GridHelper_1 = require("../../../../../lib/project-utility/GridHelper");
const ReactTemplate_1 = require("../../../../../lib/templates/ReactTemplate");
class TreeGridExportTemplate extends ReactTemplate_1.ReactTemplate {
    constructor() {
        super(__dirname);
        this.extraConfigurations = [];
        this.userExtraConfiguration = {};
        this.id = "tree-grid-export";
        this.name = "Tree Grid Exporting";
        this.description = "igTreeGrid exporting template for React";
        this.projectType = "es6";
        this.components = ["Tree Grid"];
        this.widget = "igTreeGrid";
        this.controlGroup = "Data Grids";
        this.dependencies = ["igTreeGrid"];
        this.packages = ["file-saver@^2.0.5"];
        this.gridHelper = new GridHelper_1.GridHelper();
        this.gridHelper.tree = true;
        this.hasExtraConfiguration = true;
        this.extraConfigurations.push({
            choices: ["Paging", "Hiding"],
            default: "",
            key: "features",
            message: "Select features for the igTreeGrid",
            type: 1 /* ControlExtraConfigType.MultiChoice */
        });
    }
    generateConfig(name, ...options) {
        const features = this.gridHelper.generateFeatures(this.userExtraConfiguration["features"], 5);
        const config = { treeGridFeatures: features };
        return super.generateConfig(name, { extraConfig: config });
    }
    getExtraConfiguration() {
        return this.extraConfigurations;
    }
    setExtraConfiguration(extraConfigKeys) {
        this.userExtraConfiguration = extraConfigKeys;
    }
}
module.exports = new TreeGridExportTemplate();
