var Modules;
(function (Modules) {
    /**
     * Class contains all functionality for the Law number 13.1.e
     * @returns
     */
    class _21_2_e {
        keineAngemesseneAlternative;
        SachverhaltInEinemSatz;
        /**
         * Generates the word file
         */
        GenerateWord() {
            var template = Classes.TemplateContainer.Grund_21_2_e;
            template = template.replace("{projekt}", Modules.WordWriter.ReplaceSpecialCharacters(Classes.Decision.Projekt));
            template = template.replace("{projekt_nr}", Modules.WordWriter.ReplaceSpecialCharacters(Classes.Decision.ProjektNr));
            template = template.replace("{bob_21_2_e_1}", Modules.WordWriter.ReplaceSpecialCharacters(this.keineAngemesseneAlternative));
            template = template.replace("{bob_21_2_e_2}", Modules.WordWriter.ReplaceSpecialCharacters(this.SachverhaltInEinemSatz));
            return template;
        }
        /**
         * Checks if all fields are filled
         * @returns
         */
        CheckFields() {
            var allValid = false;
            // first fill all fields
            this.keineAngemesseneAlternative = $("#keine-angemessene-alternative").val();
            this.SachverhaltInEinemSatz = $("#sachverhalt-in-einem-satz").val();
            if (this.keineAngemesseneAlternative.length && this.SachverhaltInEinemSatz.length > 0) {
                allValid = true;
            }
            return allValid;
        }
        /**
         * Resets all fields of the reason 13_1_e
         */
        ResetGrund() {
            $("#keine-angemessene-alternative").val("");
            $("#sachverhalt-in-einem-satz").val("");
        }
    }
    Modules._21_2_e = _21_2_e;
})(Modules || (Modules = {}));
//# sourceMappingURL=_21_2_e.js.map