System.register(["quill"], function (exports_1, context_1) {
    "use strict";
    var quill_1, BaseImage, ATTRIBUTES, QuillImageFormatPlugin;
    var __moduleName = context_1 && context_1.id;
    return {
        setters: [
            function (quill_1_1) {
                quill_1 = quill_1_1;
            }
        ],
        execute: function () {
            BaseImage = quill_1.default.import('formats/image');
            ATTRIBUTES = [
                'alt',
                'height',
                'width',
                'stratus-src',
                'stratusSrc'
            ];
            QuillImageFormatPlugin = class QuillImageFormatPlugin extends BaseImage {
                constructor() {
                    super(...arguments);
                    this.blotName = 'imageCustom';
                    this.tagName = 'IMG';
                }
                format(name, value) {
                    console.log('format:', name, value, this.domNode.getAttribute('src'));
                    if (ATTRIBUTES.indexOf(name) === -1) {
                        super.format(name, value);
                        return;
                    }
                    if (!value) {
                        this.domNode.removeAttribute(name);
                        return;
                    }
                    if (name === 'stratus-src') {
                        console.log('stratus-src:', value);
                    }
                    if (name === 'stratusSrc') {
                        console.log('stratusSrc:', value);
                    }
                    this.domNode.setAttribute(name, value);
                }
            };
            exports_1("QuillImageFormatPlugin", QuillImageFormatPlugin);
        }
    };
});

//# sourceMappingURL=quill-image-format.plugin.js.map
