import { h } from "@stencil/core";
export class CardHeadline {
    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 (h("div", { key: '46766a6fd8ea2e16ad47662ad5ad06d25359f5e0', class: `card__headline-wrapper ${this.hasDesc ? 'withDesc' : ""}` }, h("div", { key: '2368c853f7f8ce565ab00628b925c86eae56eae1', class: `card-headline ${this.direction}` }, h("slot", { key: '8c99851e5308f19672df8aa625ca428464fea515' }))));
    }
    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
