"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const break_1 = require("./break");
const caps_1 = require("./caps");
const formatting_1 = require("./formatting");
const properties_1 = require("./properties");
const run_fonts_1 = require("./run-fonts");
const script_1 = require("./script");
const style_1 = require("./style");
const tab_1 = require("./tab");
const underline_1 = require("./underline");
const xml_components_1 = require("../xml-components");
class Run extends xml_components_1.XmlComponent {
    constructor() {
        super("w:r");
        this.properties = new properties_1.RunProperties();
        this.root.push(this.properties);
    }
    bold() {
        this.properties.push(new formatting_1.Bold());
        return this;
    }
    italic() {
        this.properties.push(new formatting_1.Italics());
        return this;
    }
    underline(underlineType, color) {
        this.properties.push(new underline_1.Underline(underlineType, color));
        return this;
    }
    color(color) {
        this.properties.push(new formatting_1.Color(color));
        return this;
    }
    size(size) {
        this.properties.push(new formatting_1.Size(size));
        return this;
    }
    break() {
        this.root.splice(1, 0, new break_1.Break());
        return this;
    }
    tab() {
        this.root.splice(1, 0, new tab_1.Tab());
        return this;
    }
    smallCaps() {
        this.properties.push(new caps_1.SmallCaps());
        return this;
    }
    allCaps() {
        this.properties.push(new caps_1.Caps());
        return this;
    }
    strike() {
        this.properties.push(new formatting_1.Strike());
        return this;
    }
    doubleStrike() {
        this.properties.push(new formatting_1.DoubleStrike());
        return this;
    }
    subScript() {
        this.properties.push(new script_1.SubScript());
        return this;
    }
    superScript() {
        this.properties.push(new script_1.SuperScript());
        return this;
    }
    font(fontName) {
        this.properties.push(new run_fonts_1.RunFonts(fontName));
        return this;
    }
    style(styleId) {
        this.properties.push(new style_1.Style(styleId));
        return this;
    }
}
exports.Run = Run;
//# sourceMappingURL=run.js.map