import Renderables from '../Renderables';
import node from "../../support/node";
/**
 * Implementation of the 'video' markup element.
 * A video HTML element is created and the given attributes
 * id and src are applied from the markup. The lto-video
 * class is added to allow CSS manipulations.
 *
 * @see {@link IRenderable}
 */
var Video = /** @class */ (function () {
    function Video(spec) {
        this.spec = spec;
    }
    /**
     * @inheritDoc
     */
    Video.prototype.render = function (renderer, isNested) {
        var video = node("video");
        video.setId(this.spec.id);
        video.addClasses("lto-video", "lto-left");
        video.addAttributes({ controls: true, src: this.spec.src });
        this.spec.class !== undefined ? video.addClasses(this.spec.class) : function () { };
        if (isNested)
            video.addClasses("lto-nested");
        return video.unwrap();
    };
    return Video;
}());
export { Video };
Renderables.register("video", Video);
//# sourceMappingURL=index.js.map