'use strict';

var index = require('./index-Bkm7eeWO.js');

const eclCardEcCss = () => `.ecl-card.sc-ecl-card-ec{background-color:var(--cm-surface-inverted);border-bottom:4px solid var(--cm-border-medium);border-radius:4px;box-shadow:var(--sh-1);box-sizing:border-box;height:100%;margin:0;overflow:hidden;overflow-wrap:break-word;width:100%}.ecl-card__image.sc-ecl-card-ec{aspect-ratio:3/2;display:block;height:auto;object-fit:cover;width:100%}.ecl-card__body.sc-ecl-card-ec{padding:var(--s-xl);position:relative}`;

const eclCardEuCss = () => `.ecl-card.sc-ecl-card-eu{background-color:#fff;border-bottom:none;border-radius:8px;box-shadow:var(--sh-1);box-sizing:border-box;height:100%;margin:0;overflow:hidden;overflow-wrap:break-word;width:100%}.ecl-card__image.sc-ecl-card-eu{aspect-ratio:3/2;display:block;height:auto;object-fit:cover;width:100%}.ecl-card__body.sc-ecl-card-eu{padding:var(--s-l);position:relative}.ecl-card__body.sc-ecl-card-eu:before{background-color:var(--cm-surface-secondary,var(--c-s));border-bottom-left-radius:2px;border-bottom-right-radius:2px;content:"";height:4px;left:var(--s-l);position:absolute;top:0;width:32px}`;

const EclCard = class {
    constructor(hostRef) {
        index.registerInstance(this, hostRef);
        this.styleClass = '';
        this.imageZoom = false;
    }
    getClass() {
        return [
            `ecl-card`,
            this.styleClass
        ].join(' ');
    }
    componentWillLoad() {
        var _a;
        this.theme = (_a = document.documentElement.getAttribute('data-ecl-theme')) !== null && _a !== void 0 ? _a : (this.theme || 'ec');
    }
    render() {
        return (index.h("article", { key: '5329eccffc6ab1b2844ec40317272e45b649c2e5', class: this.getClass() }, index.h("ecl-picture", { key: 'edbf68ca427dbdf7357f7eec626ed1a6d324381c', image: this.image, imageAlt: this.imageAlt, imgClass: `ecl-card__image sc-ecl-card-${this.theme}`, styleClass: `ecl-card__picture sc-ecl-picture-${this.theme}`, zoom: this.imageZoom, "data-ecl-picture-link": true }, index.h("slot", { key: '5654ee78297946b4449d78b908b3bcad29fd58dd', name: "sources" })), index.h("div", { key: '42b278097ac655c6c547e31e5682337b4eec2ff5', class: "ecl-card__body" }, index.h("slot", { key: 'a571a5a2f26d7b2ca4b23d2f3a08b55b645c806c' }))));
    }
};
EclCard.style = {
    ec: eclCardEcCss(),
    eu: eclCardEuCss()
};

exports.ecl_card = EclCard;
