"use strict";
require("ng-wig/dist/ng-wig");
var angular = require("angular");
var typescript_angular_utilities_1 = require("typescript-angular-utilities");
var richTextEditor_config_1 = require("./richTextEditor.config");
var headerButton_1 = require("./headerButton");
var paragraphButton_1 = require("./paragraphButton");
var externalProviderName = richTextEditor_config_1.providerName + 'Provider';
exports.providerName = externalProviderName;
exports.moduleName = 'rl.ui.components.richTextEditor';
exports.componentName = 'rlRichTextEditor';
exports.controllerName = 'RichTextEditorController';
var RichTextEditorController = (function () {
    function RichTextEditorController(object, provider) {
        this.toolbar = 'h1, paragraph, bold, italic, underline, list1, list2, indent, outdent';
        if (!object.isNullOrEmpty(this.customButtons)) {
            this.toolbar += ', ' + this.customButtons;
        }
    }
    return RichTextEditorController;
}());
RichTextEditorController.$inject = [typescript_angular_utilities_1.downgrade.objectServiceName, richTextEditor_config_1.providerName];
exports.RichTextEditorController = RichTextEditorController;
var richTextEditor = {
    template: require('./richTextEditor.html'),
    controller: exports.controllerName,
    controllerAs: 'editor',
    bindings: {
        ngModel: '=',
        customButtons: '=',
        ngDisabled: '=',
    },
};
angular.module(exports.moduleName, ['ngWig', typescript_angular_utilities_1.downgrade.moduleName])
    .component(exports.componentName, richTextEditor)
    .controller(exports.controllerName, RichTextEditorController)
    .directive(headerButton_1.headerButtonDirectiveName, headerButton_1.headerButton)
    .directive(paragraphButton_1.paragraphButtonDirectiveName, paragraphButton_1.paragraphButton)
    .provider(richTextEditor_config_1.providerName, richTextEditor_config_1.richTextEditorProvider);
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmljaFRleHRFZGl0b3IuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJyaWNoVGV4dEVkaXRvci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsOEJBQTRCO0FBRTVCLGlDQUFtQztBQUduQyw2RUFBbUU7QUFHbkUsaUVBQXdHO0FBQ3hHLCtDQUEwRTtBQUMxRSxxREFBbUY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