"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const html_1 = require("../../../../../client/html");
class Image_ extends html_1.default {
    constructor($props, $system, $element) {
        super($props, $system, $system.api.document.createElement('img'), $system.style['image']);
        const { className, src } = this.$props;
        if (className) {
            this.$element.className = className;
        }
        if (src !== undefined) {
            this.$element.src = src;
        }
        this.$propHandler = {
            ...this.$propHandler,
            src: (url) => {
                this.$element.src = url !== null && url !== void 0 ? url : '';
            },
        };
    }
}
exports.default = Image_;
//# sourceMappingURL=Component.js.map