import { r as registerInstance, a as getElement, h } from './index-Cby2wKoI.js';

const cardHeadlineCss = () => `: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) {
        registerInstance(this, hostRef);
    }
    get el() { return getElement(this); }
    direction;
    hasDesc;
    componentWillLoad() {
        const cardElement = this.el.closest("ifx-card");
        if (cardElement) {
            const cardClass = cardElement.shadowRoot.querySelector(".card")?.className;
            if (cardClass && cardClass.includes("horizontal")) {
                this.direction = "horizontal";
            }
            const desc = cardElement.querySelector("ifx-card-text");
            if (desc) {
                this.hasDesc = true;
            }
        }
    }
    render() {
        return (h("div", { key: '256f7113bf55303b27dcb701371a6f794cbdb7d5', class: `card__headline-wrapper ${this.hasDesc ? "withDesc" : ""}` }, h("div", { key: 'd5cdb2d7319b4dc35f4c07fa7f5c14c94da1f60c', class: `card-headline ${this.direction}` }, h("slot", { key: 'df29684c4e66bbfe0c5a0f85e4daec968199b77a' }))));
    }
};
CardHeadline.style = cardHeadlineCss();

export { CardHeadline as ifx_card_headline };
//# sourceMappingURL=ifx-card-headline.entry.js.map

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