'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

const index = require('./index-420e0ca1.js');

const eclNavigationListEcCss = ".ecl-navigation-list.sc-ecl-navigation-list-ec{margin:0}.ecl-navigation-list--col-2.sc-ecl-navigation-list-ec,.ecl-navigation-list--col-3.sc-ecl-navigation-list-ec{display:grid;grid-auto-rows:auto;grid-column-gap:2rem;grid-row-gap:2rem;width:100%}@media (min-width:996px){.ecl-navigation-list--col-2.sc-ecl-navigation-list-ec{grid-template-columns:repeat(2,1fr)}.ecl-navigation-list--col-3.sc-ecl-navigation-list-ec{grid-template-columns:repeat(3,1fr)}}.ecl-navigation-list__item.sc-ecl-navigation-list-ec{background-color:#fff;border:1px solid #cfcfcf;border-radius:0;box-shadow:none;box-sizing:border-box;overflow:hidden}.ecl-navigation-list__image.sc-ecl-navigation-list-ec{aspect-ratio:4/1;-o-object-fit:cover;object-fit:cover;width:100%}.ecl-navigation-list__content-block.sc-ecl-navigation-list-ec{padding:1rem;position:relative}.ecl-navigation-list__item--no-border.sc-ecl-navigation-list-ec{border-radius:0;border-width:0;box-shadow:none}.ecl-navigation-list__item--no-border.sc-ecl-navigation-list-ec .ecl-navigation-list__image.sc-ecl-navigation-list-ec{border:1px solid #cfcfcf}.ecl-navigation-list__item--no-border.sc-ecl-navigation-list-ec .ecl-navigation-list__content-block.sc-ecl-navigation-list-ec{padding-inline-end:0;padding-inline-start:0}";

const eclNavigationListEuCss = ".ecl-navigation-list.sc-ecl-navigation-list-eu{margin:0}.ecl-navigation-list--col-2.sc-ecl-navigation-list-eu,.ecl-navigation-list--col-3.sc-ecl-navigation-list-eu{display:grid;grid-auto-rows:auto;grid-column-gap:2rem;grid-row-gap:2rem;width:100%}@media (min-width:996px){.ecl-navigation-list--col-2.sc-ecl-navigation-list-eu{grid-template-columns:repeat(2,1fr)}.ecl-navigation-list--col-3.sc-ecl-navigation-list-eu{grid-template-columns:repeat(3,1fr)}}.ecl-navigation-list__item.sc-ecl-navigation-list-eu{background-color:#fff;border:0;border-radius:8px;box-shadow:0 2px 4px rgba(9,49,142,.08),0 0 10px rgba(9,49,142,.04),0 4px 5px rgba(9,49,142,.04),0 -4px 4px rgba(9,49,142,.04);box-sizing:border-box;overflow:hidden}.ecl-navigation-list__image.sc-ecl-navigation-list-eu{aspect-ratio:4/1;-o-object-fit:cover;object-fit:cover;width:100%}.ecl-navigation-list__content-block.sc-ecl-navigation-list-eu{padding:1.5rem;position:relative}.ecl-navigation-list__item--no-border.sc-ecl-navigation-list-eu{border-radius:0;border-width:0;box-shadow:none}.ecl-navigation-list__item--no-border.sc-ecl-navigation-list-eu .ecl-navigation-list__image.sc-ecl-navigation-list-eu{border:1px solid #cfdaf5}.ecl-navigation-list__item--no-border.sc-ecl-navigation-list-eu .ecl-navigation-list__content-block.sc-ecl-navigation-list-eu{padding-inline-end:0;padding-inline-start:0}.ecl-navigation-list__item.sc-ecl-navigation-list-eu:not(.ecl-navigation-list__item--no-border) .ecl-navigation-list__content-block.sc-ecl-navigation-list-eu:before{background-color:#fc0;border-bottom-left-radius:2px;border-bottom-right-radius:2px;content:\"\";height:4px;left:1.5rem;position:absolute;top:0;width:32px}";

const EclNavigationList = class {
    constructor(hostRef) {
        index.registerInstance(this, hostRef);
        this.theme = 'ec';
        this.column = 2;
        this.styleClass = undefined;
    }
    getClass() {
        const styleClasses = [
            `ecl-navigation-list`,
            `ecl-navigation-list--col-${this.column}`,
            this.styleClass
        ];
        return styleClasses.join(' ');
    }
    componentDidRender() {
        // Clean the html to make the zebra work,.
        const items = this.el.querySelectorAll('.ecl-navigation-list__item');
        if (items) {
            this.el.querySelector('.ecl-navigation-list').innerHTML = '';
            this.el.querySelector('.ecl-navigation-list').append(...items);
        }
        const blocks = this.el.querySelectorAll('.ecl-content-block');
        if (blocks) {
            blocks.forEach((block) => {
                block.classList.add('ecl-navigation-list__content-block', `sc-ecl-navigation-list-${this.theme}`);
            });
        }
    }
    render() {
        return (index.h("div", { class: this.getClass() }, index.h("slot", null)));
    }
    get el() { return index.getElement(this); }
};
EclNavigationList.style = {
    ec: eclNavigationListEcCss,
    eu: eclNavigationListEuCss
};

exports.ecl_navigation_list = EclNavigationList;

//# sourceMappingURL=ecl-navigation-list.cjs.entry.js.map