import * as i0 from '@angular/core';
import { Input, ViewEncapsulation, ChangeDetectionStrategy, Component, NgModule } from '@angular/core';

class TitleToken {
}
class TitleComponent extends TitleToken {
    /** Header size of the title. */
    set headerSize(value) {
        this._headerSize = value;
        if (this._appliedHeaderSize !== this._headerSize) {
            this._setHeaderSize();
        }
    }
    get headerSize() {
        return this._headerSize;
    }
    /** @hidden */
    constructor(_elementRef) {
        super();
        this._elementRef = _elementRef;
        /** Whether or not the title should wrap (truncates by default) */
        this.wrap = false;
        /** The size of the header */
        this._headerSize = null;
    }
    /** @hidden */
    ngOnInit() {
        this._setHeaderSize();
    }
    /** returns the reference to the title element */
    get elementRef() {
        return this._elementRef;
    }
    /** @hidden */
    _setHeaderSize() {
        let headerSize;
        if (this.headerSize) {
            headerSize = this.headerSize;
        }
        else {
            headerSize = this._elementRef.nativeElement.tagName.charAt(1);
        }
        this._elementRef.nativeElement.classList.remove(`fd-title--h${this._appliedHeaderSize}`);
        this._elementRef.nativeElement.classList.add(`fd-title--h${headerSize}`);
        this._appliedHeaderSize = headerSize;
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.2", ngImport: i0, type: TitleComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.2", type: TitleComponent, isStandalone: true, selector: "[fd-title], [fdTitle]", inputs: { headerSize: "headerSize", wrap: "wrap" }, host: { properties: { "class.fd-title--wrap": "wrap" }, classAttribute: "fd-title" }, providers: [{ provide: TitleToken, useExisting: TitleComponent }], exportAs: ["fd-title"], usesInheritance: true, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, styles: [".fd-title{font-size:1rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;--fdTitle_Font_Size:1rem;--fdTitle_Color:var(--sapTextColor);--fdTitle_Font_Family:var(--sapFontHeaderFamily);border:0;-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--sapTextColor);color:var(--fdTitle_Color);font-family:var(--sapFontFamily);font-family:var(--fdTitle_Font_Family);font-size:var(--sapFontSize);font-size:var(--fdTitle_Font_Size);font-weight:400;forced-color-adjust:none;line-height:normal;margin-block:0;margin-inline:0;padding-block:0;padding-inline:0}.fd-title:after,.fd-title:before{-webkit-box-sizing:inherit;box-sizing:inherit;font-size:inherit}.fd-title--h1{--fdTitle_Font_Size:var(--sapFontHeader1Size)}.fd-title--h2{--fdTitle_Font_Size:var(--sapFontHeader2Size)}.fd-title--h3{--fdTitle_Font_Size:var(--sapFontHeader3Size)}.fd-title--h4{--fdTitle_Font_Size:var(--sapFontHeader4Size)}.fd-title--h5{--fdTitle_Font_Size:var(--sapFontHeader5Size)}.fd-title--h6{--fdTitle_Font_Size:var(--sapFontHeader6Size)}.fd-title--wrap{overflow:auto;text-overflow:clip;white-space:normal}\n/*! Bundled license information:\n\nfundamental-styles/dist/title.css:\n  (*!\n   * Fundamental Library Styles v0.40.1\n   * Copyright (c) 2025 SAP SE or an SAP affiliate company.\n   * Licensed under Apache License 2.0 (https://github.com/SAP/fundamental-styles/blob/main/LICENSE)\n   *)\n*/\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.2", ngImport: i0, type: TitleComponent, decorators: [{
            type: Component,
            args: [{ selector: '[fd-title], [fdTitle]', exportAs: 'fd-title', template: '<ng-content></ng-content>', host: {
                        class: 'fd-title',
                        '[class.fd-title--wrap]': 'wrap'
                    }, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, providers: [{ provide: TitleToken, useExisting: TitleComponent }], standalone: true, styles: [".fd-title{font-size:1rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;--fdTitle_Font_Size:1rem;--fdTitle_Color:var(--sapTextColor);--fdTitle_Font_Family:var(--sapFontHeaderFamily);border:0;-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--sapTextColor);color:var(--fdTitle_Color);font-family:var(--sapFontFamily);font-family:var(--fdTitle_Font_Family);font-size:var(--sapFontSize);font-size:var(--fdTitle_Font_Size);font-weight:400;forced-color-adjust:none;line-height:normal;margin-block:0;margin-inline:0;padding-block:0;padding-inline:0}.fd-title:after,.fd-title:before{-webkit-box-sizing:inherit;box-sizing:inherit;font-size:inherit}.fd-title--h1{--fdTitle_Font_Size:var(--sapFontHeader1Size)}.fd-title--h2{--fdTitle_Font_Size:var(--sapFontHeader2Size)}.fd-title--h3{--fdTitle_Font_Size:var(--sapFontHeader3Size)}.fd-title--h4{--fdTitle_Font_Size:var(--sapFontHeader4Size)}.fd-title--h5{--fdTitle_Font_Size:var(--sapFontHeader5Size)}.fd-title--h6{--fdTitle_Font_Size:var(--sapFontHeader6Size)}.fd-title--wrap{overflow:auto;text-overflow:clip;white-space:normal}\n/*! Bundled license information:\n\nfundamental-styles/dist/title.css:\n  (*!\n   * Fundamental Library Styles v0.40.1\n   * Copyright (c) 2025 SAP SE or an SAP affiliate company.\n   * Licensed under Apache License 2.0 (https://github.com/SAP/fundamental-styles/blob/main/LICENSE)\n   *)\n*/\n"] }]
        }], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { headerSize: [{
                type: Input
            }], wrap: [{
                type: Input
            }] } });

class TitleModule {
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.2", ngImport: i0, type: TitleModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
    static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.0.2", ngImport: i0, type: TitleModule, imports: [TitleComponent], exports: [TitleComponent] }); }
    static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.0.2", ngImport: i0, type: TitleModule }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.2", ngImport: i0, type: TitleModule, decorators: [{
            type: NgModule,
            args: [{
                    imports: [TitleComponent],
                    exports: [TitleComponent]
                }]
        }] });

/**
 * Generated bundle index. Do not edit.
 */

export { TitleComponent, TitleModule, TitleToken };
//# sourceMappingURL=fundamental-ngx-core-title.mjs.map
