'use strict';

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

const cardHeadlineCss = ":root{--ifx-font-family:\"Source Sans 3\", 'Arial, sans-serif'}:host{pointer-events:none}.card__headline-wrapper{padding-bottom:16px}.card__headline-wrapper.withDesc{padding-bottom:8px}.card-headline{margin-top:0;padding-top:0;font-family:var(--ifx-font-family);font-weight:600;font-size:1.5rem;line-height:2rem;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.card-headline.horizontal{font-size:1.25rem;line-height:28px}";

const CardHeadline = class {
    constructor(hostRef) {
        index.registerInstance(this, hostRef);
    }
    componentWillLoad() {
        var _a;
        const cardElement = this.el.closest('ifx-card');
        if (cardElement) {
            const cardClass = (_a = cardElement.shadowRoot.querySelector('.card')) === null || _a === void 0 ? void 0 : _a.className;
            if (cardClass && cardClass.includes('horizontal')) {
                this.direction = 'horizontal';
            }
            const desc = cardElement.querySelector('ifx-card-text');
            if (desc) {
                this.hasDesc = true;
            }
        }
    }
    render() {
        return (index.h("div", { key: '46766a6fd8ea2e16ad47662ad5ad06d25359f5e0', class: `card__headline-wrapper ${this.hasDesc ? 'withDesc' : ""}` }, index.h("div", { key: '2368c853f7f8ce565ab00628b925c86eae56eae1', class: `card-headline ${this.direction}` }, index.h("slot", { key: '8c99851e5308f19672df8aa625ca428464fea515' }))));
    }
    get el() { return index.getElement(this); }
};
CardHeadline.style = cardHeadlineCss;

exports.ifx_card_headline = CardHeadline;
//# sourceMappingURL=ifx-card-headline.entry.cjs.js.map

//# sourceMappingURL=ifx-card-headline.cjs.entry.js.map