import { r as registerInstance, h } from './core-095fd691.js';
import { R as ResolveLocation } from './resolve-location-6b3481e9.js';
var BceElementAudio = /** @class */ (function () {
    function class_1(hostRef) {
        registerInstance(this, hostRef);
        this.resolveLocation = ResolveLocation.NOOP;
        this.url = '';
    }
    class_1.prototype.componentWillLoad = function () {
        var _this = this;
        if (!this.template)
            return;
        if (this.template.location.startsWith('BCE://'))
            this.resolveLocation(this.template.location).then(function (url) { return (_this.url = url); });
        else
            this.url = this.template.location;
    };
    class_1.prototype.render = function () {
        if (!this.template)
            return null;
        return (h("audio", { key: this.url, autoplay: this.template.autoplay, controls: true }, h("source", { src: this.url })));
    };
    Object.defineProperty(class_1, "style", {
        get: function () { return "bce-element-audio{display:block;margin:1rem 0}"; },
        enumerable: true,
        configurable: true
    });
    return class_1;
}());
export { BceElementAudio as bce_element_audio };
