"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const GridHelper_1 = require("../../../../../lib/project-utility/GridHelper");
const jQueryTemplate_1 = require("../../../../../lib/templates/jQueryTemplate");
class GridTemplatingTemplate extends jQueryTemplate_1.jQueryTemplate {
    constructor() {
        super(__dirname);
        this.userExtraConfiguration = {};
        this.hasExtraConfiguration = true;
        this.id = "grid-templating";
        this.name = "Grid Templating";
        this.description = "igGrid templating template";
        this.projectType = "js";
        this.components = ["Grid"];
        this.controlGroup = "Data Grids";
        this.dependencies = ["igGrid"];
        this.gridHelper = new GridHelper_1.GridHelper();
        this.extraConfigurations = [];
        const featureConfiguration = {
            choices: ["Sorting", "Paging", "Filtering"],
            default: "",
            key: "features",
            message: "Select features for the igGrid",
            type: 1 /* ControlExtraConfigType.MultiChoice */
        };
        this.extraConfigurations.push(featureConfiguration);
    }
    setExtraConfiguration(extraConfigKeys) {
        this.userExtraConfiguration = extraConfigKeys;
    }
    generateConfig(name, ...options) {
        const features = this.gridHelper.generateFeatures(this.userExtraConfiguration["features"], 4);
        const config = { gridfeatures: features };
        return super.generateConfig(name, { extraConfig: config });
    }
    getExtraConfiguration() {
        return this.extraConfigurations;
    }
}
module.exports = new GridTemplatingTemplate();
