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