import { r as registerInstance, h } from './core-095fd691.js';
import { R as ResolveLocation } from './resolve-location-6b3481e9.js';
var BceElementImage = /** @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 () {
        return this.template && this.url && h("img", { src: this.url });
    };
    Object.defineProperty(class_1, "style", {
        get: function () { return "bce-element-image{display:block;max-width:1200px;text-align:center}bce-element-image img{margin:1rem 0;width:100%;max-height:32rem}\@media screen and (min-width:1024px){bce-element-image{text-align:left;width:auto}}"; },
        enumerable: true,
        configurable: true
    });
    return class_1;
}());
export { BceElementImage as bce_element_image };
