"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const GridHelper_1 = require("../../../../../lib/project-utility/GridHelper");
const ReactTemplate_1 = require("../../../../../lib/templates/ReactTemplate");
class GridExportTemplate extends ReactTemplate_1.ReactTemplate {
    constructor() {
        super(__dirname);
        this.extraConfigurations = [];
        this.userExtraConfiguration = {};
        this.id = "grid-export";
        this.name = "Grid Exporting";
        this.description = "igGrid exporting template for React";
        this.projectType = "es6";
        this.components = ["Grid"];
        this.widget = "igGrid";
        this.controlGroup = "Data Grids";
        this.dependencies = ["igGrid"];
        this.packages = ["file-saver@^2.0.5"];
        this.gridHelper = new GridHelper_1.GridHelper();
        this.hasExtraConfiguration = true;
        this.extraConfigurations.push({
            choices: ["Paging", "Hiding"],
            default: "",
            key: "features",
            message: "Select features for the igGrid",
            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 GridExportTemplate();
