import { h } from "@stencil/core";
export class CardHeadline {
    el;
    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' }))));
    }
    static get is() { return "ifx-card-headline"; }
    static get encapsulation() { return "shadow"; }
    static get originalStyleUrls() {
        return {
            "$": ["card-headline.scss"]
        };
    }
    static get styleUrls() {
        return {
            "$": ["card-headline.css"]
        };
    }
    static get states() {
        return {
            "direction": {},
            "hasDesc": {}
        };
    }
    static get elementRef() { return "el"; }
}
//# sourceMappingURL=card-headline.js.map
