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

class ObjectAttributeComponent {
    /** @hidden */
    constructor(_el, _renderer) {
        this._el = _el;
        this._renderer = _renderer;
        /** Emitting object attribute link click event */
        this.objectAttributeclick = new EventEmitter();
    }
    /** @hidden */
    ngOnInit() {
        this._renderer.addClass(this._el.nativeElement, 'fd-object-attribute');
        if (this.label !== null && this.label !== undefined) {
            this._renderer.setProperty(this._el.nativeElement, 'aria-label', this.label);
            this._renderer.setProperty(this._el.nativeElement, 'title', this.label);
        }
    }
    /**
     *  Handles link click
     */
    onObjectAttributeClick(event) {
        if (this.islink) {
            this.objectAttributeclick.emit(event);
        }
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: ObjectAttributeComponent, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.0", type: ObjectAttributeComponent, isStandalone: true, selector: "fd-object-attribute", inputs: { label: "label", linkText: "linkText", islink: "islink", disabled: "disabled" }, outputs: { objectAttributeclick: "objectAttributeclick" }, ngImport: i0, template: "{{ label }}\n<ng-content></ng-content>\n@if (linkText !== null && linkText !== undefined) {\n    <span\n        (click)=\"onObjectAttributeClick($event)\"\n        [attr.tabindex]=\"disabled ? '-1' : '0'\"\n        [attr.aria-label]=\"linkText\"\n        [attr.title]=\"linkText\"\n        [class.fd-object-attribute--link]=\"islink\"\n        role=\"link\"\n        [attr.aria-disabled]=\"disabled\"\n        (keydown.enter)=\"onObjectAttributeClick($event)\"\n    >\n        {{ linkText }}\n    </span>\n}\n", styles: [".fd-object-attribute{border:0;-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--sapTextColor);color:var(--sapContent_LabelColor);display:block;font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;line-height:normal;margin-block:0;margin-inline:0;overflow:hidden;padding-block:0;padding-inline:0;text-overflow:ellipsis;white-space:nowrap}.fd-object-attribute:after,.fd-object-attribute:before{-webkit-box-sizing:inherit;box-sizing:inherit;font-size:inherit}.fd-object-attribute--link{color:var(--sapLinkColor);cursor:pointer;text-decoration:none}.fd-object-attribute--link:visited{color:var(--sapLink_Visited_Color)}.fd-object-attribute--link.is-hover,.fd-object-attribute--link:hover{color:var(--sapLink_Hover_Color);text-decoration:underline}.fd-object-attribute--link.is-focus,.fd-object-attribute--link:focus{outline:var(--sapContent_FocusColor) var(--sapContent_FocusStyle) var(--sapContent_FocusWidth);outline-offset:-.0625rem;z-index:5}.fd-object-attribute--link.is-disabled,.fd-object-attribute--link:disabled,.fd-object-attribute--link[aria-disabled=true]{opacity:var(--sapContent_DisabledOpacity);pointer-events:none}\n/*! Bundled license information:\n\nfundamental-styles/dist/object-attribute.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: "21.1.0", ngImport: i0, type: ObjectAttributeComponent, decorators: [{
            type: Component,
            args: [{ selector: 'fd-object-attribute', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, imports: [], template: "{{ label }}\n<ng-content></ng-content>\n@if (linkText !== null && linkText !== undefined) {\n    <span\n        (click)=\"onObjectAttributeClick($event)\"\n        [attr.tabindex]=\"disabled ? '-1' : '0'\"\n        [attr.aria-label]=\"linkText\"\n        [attr.title]=\"linkText\"\n        [class.fd-object-attribute--link]=\"islink\"\n        role=\"link\"\n        [attr.aria-disabled]=\"disabled\"\n        (keydown.enter)=\"onObjectAttributeClick($event)\"\n    >\n        {{ linkText }}\n    </span>\n}\n", styles: [".fd-object-attribute{border:0;-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--sapTextColor);color:var(--sapContent_LabelColor);display:block;font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;line-height:normal;margin-block:0;margin-inline:0;overflow:hidden;padding-block:0;padding-inline:0;text-overflow:ellipsis;white-space:nowrap}.fd-object-attribute:after,.fd-object-attribute:before{-webkit-box-sizing:inherit;box-sizing:inherit;font-size:inherit}.fd-object-attribute--link{color:var(--sapLinkColor);cursor:pointer;text-decoration:none}.fd-object-attribute--link:visited{color:var(--sapLink_Visited_Color)}.fd-object-attribute--link.is-hover,.fd-object-attribute--link:hover{color:var(--sapLink_Hover_Color);text-decoration:underline}.fd-object-attribute--link.is-focus,.fd-object-attribute--link:focus{outline:var(--sapContent_FocusColor) var(--sapContent_FocusStyle) var(--sapContent_FocusWidth);outline-offset:-.0625rem;z-index:5}.fd-object-attribute--link.is-disabled,.fd-object-attribute--link:disabled,.fd-object-attribute--link[aria-disabled=true]{opacity:var(--sapContent_DisabledOpacity);pointer-events:none}\n/*! Bundled license information:\n\nfundamental-styles/dist/object-attribute.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 }, { type: i0.Renderer2 }], propDecorators: { label: [{
                type: Input
            }], linkText: [{
                type: Input
            }], islink: [{
                type: Input
            }], disabled: [{
                type: Input
            }], objectAttributeclick: [{
                type: Output
            }] } });

/**
 * @deprecated
 * Use direct imports of components and directives.
 */
class ObjectAttributeModule {
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: ObjectAttributeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
    static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.1.0", ngImport: i0, type: ObjectAttributeModule, imports: [ObjectAttributeComponent], exports: [ObjectAttributeComponent] }); }
    static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: ObjectAttributeModule }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: ObjectAttributeModule, decorators: [{
            type: NgModule,
            args: [{
                    imports: [ObjectAttributeComponent],
                    exports: [ObjectAttributeComponent]
                }]
        }] });

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

export { ObjectAttributeComponent, ObjectAttributeModule };
//# sourceMappingURL=fundamental-ngx-core-object-attribute.mjs.map
