import * as i0 from '@angular/core';
import { inject, booleanAttribute, Input, HostBinding, ChangeDetectionStrategy, Component, NgModule } from '@angular/core';
import * as i1 from '@eui/components/shared';
import { BaseStatesDirective } from '@eui/components/shared';

/**
 * @description
 * A versatile label component that can be used as a standard label, sublabel, or other text elements.
 * Supports various states, sizes, and appearance modifications through host directives.
 */
class EuiLabelComponent {
    constructor() {
        /**
         * @description Indicates if the label should be marked as required
         * @default false
         */
        this.euiRequired = false;
        /**
         * @description Indicates if the label should be displayed in readonly state
         * @default false
         */
        this.euiReadonly = false;
        /**
         * @description Indicates if the component should be rendered as a sublabel
         * @default false
         */
        this.euiSublabel = false;
        this.baseStatesDirective = inject(BaseStatesDirective);
    }
    /**
     * @description
     * Computes and returns the CSS classes for the label component based on its current state.
     * Combines base states, required status, readonly status, and sublabel type.
     *
     * @returns {string} Space-separated string of CSS class names
     */
    get cssClasses() {
        return [
            this.baseStatesDirective.getCssClasses('eui-label'),
            this.euiRequired ? 'eui-label--required' : '',
            this.euiReadonly ? 'eui-label--readonly' : '',
            this.euiSublabel ? 'eui-label__sublabel' : '',
        ]
            .join(' ')
            .trim();
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: EuiLabelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "19.2.17", type: EuiLabelComponent, isStandalone: true, selector: "label[euiLabel], span[euiLabel], div[euiLabel], a[euiLabel], eui-label,\n               label[euiSublabel], span[euiSublabel], div[euiSublabel], a[euiSublabel], eui-sublabel", inputs: { euiRequired: ["euiRequired", "euiRequired", booleanAttribute], euiReadonly: ["euiReadonly", "euiReadonly", booleanAttribute], euiSublabel: ["euiSublabel", "euiSublabel", booleanAttribute] }, host: { properties: { "class": "this.cssClasses" } }, hostDirectives: [{ directive: i1.BaseStatesDirective, inputs: ["euiPrimary", "euiPrimary", "euiSecondary", "euiSecondary", "euiSuccess", "euiSuccess", "euiInfo", "euiInfo", "euiWarning", "euiWarning", "euiDanger", "euiDanger", "euiVariant", "euiVariant", "euiSizeS", "euiSizeS", "euiSizeM", "euiSizeM", "euiSizeL", "euiSizeL", "euiSizeVariant", "euiSizeVariant", "euiDisabled", "euiDisabled"] }], ngImport: i0, template: '<ng-content/>', isInline: true, styles: [".eui-19 :host.eui-label{display:inline-block;font-family:var(--eui-f-family)}.eui-19 :host.eui-label__sublabel{color:var(--eui-c-text-light);display:block;font-family:var(--eui-f-family);margin-bottom:var(--eui-s-2xs);margin-top:var(--eui-s-2xs)}.eui-19 :host.eui-label--primary{color:var(--eui-c-s-primary)}.eui-19 :host.eui-label--secondary{color:var(--eui-c-s-secondary)}.eui-19 :host.eui-label--info{color:var(--eui-c-s-info)}.eui-19 :host.eui-label--success{color:var(--eui-c-s-success)}.eui-19 :host.eui-label--warning{color:var(--eui-c-s-warning)}.eui-19 :host.eui-label--danger{color:var(--eui-c-s-danger)}.eui-19 :host.eui-label--size-s{font:var(--eui-f-s)}.eui-19 :host.eui-label--size-m{font:var(--eui-f-m)}.eui-19 :host.eui-label--size-l{font:var(--eui-f-l)}.eui-19 :host.eui-label--required:after{color:var(--eui-c-s-danger);content:\"*\";line-height:1;padding-left:var(--eui-s-2xs);font:var(--eui-f-l-compact-bold)}.eui-19 :host.eui-label--disabled{color:var(--eui-c-disabled)}.eui-19 :host.eui-label--readonly{color:var(--eui-c-readonly)}.eui-19 :host.eui-label--selected{font:var(--eui-f-m-bold)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: EuiLabelComponent, decorators: [{
            type: Component,
            args: [{ selector: `label[euiLabel], span[euiLabel], div[euiLabel], a[euiLabel], eui-label,
               label[euiSublabel], span[euiSublabel], div[euiSublabel], a[euiSublabel], eui-sublabel`, template: '<ng-content/>', changeDetection: ChangeDetectionStrategy.OnPush, hostDirectives: [
                        {
                            directive: BaseStatesDirective,
                            inputs: [
                                'euiPrimary',
                                'euiSecondary',
                                'euiSuccess',
                                'euiInfo',
                                'euiWarning',
                                'euiDanger',
                                'euiVariant',
                                'euiSizeS',
                                'euiSizeM',
                                'euiSizeL',
                                'euiSizeVariant',
                                'euiDisabled',
                            ],
                        },
                    ], styles: [".eui-19 :host.eui-label{display:inline-block;font-family:var(--eui-f-family)}.eui-19 :host.eui-label__sublabel{color:var(--eui-c-text-light);display:block;font-family:var(--eui-f-family);margin-bottom:var(--eui-s-2xs);margin-top:var(--eui-s-2xs)}.eui-19 :host.eui-label--primary{color:var(--eui-c-s-primary)}.eui-19 :host.eui-label--secondary{color:var(--eui-c-s-secondary)}.eui-19 :host.eui-label--info{color:var(--eui-c-s-info)}.eui-19 :host.eui-label--success{color:var(--eui-c-s-success)}.eui-19 :host.eui-label--warning{color:var(--eui-c-s-warning)}.eui-19 :host.eui-label--danger{color:var(--eui-c-s-danger)}.eui-19 :host.eui-label--size-s{font:var(--eui-f-s)}.eui-19 :host.eui-label--size-m{font:var(--eui-f-m)}.eui-19 :host.eui-label--size-l{font:var(--eui-f-l)}.eui-19 :host.eui-label--required:after{color:var(--eui-c-s-danger);content:\"*\";line-height:1;padding-left:var(--eui-s-2xs);font:var(--eui-f-l-compact-bold)}.eui-19 :host.eui-label--disabled{color:var(--eui-c-disabled)}.eui-19 :host.eui-label--readonly{color:var(--eui-c-readonly)}.eui-19 :host.eui-label--selected{font:var(--eui-f-m-bold)}\n"] }]
        }], propDecorators: { cssClasses: [{
                type: HostBinding,
                args: ['class']
            }], euiRequired: [{
                type: Input,
                args: [{ transform: booleanAttribute }]
            }], euiReadonly: [{
                type: Input,
                args: [{ transform: booleanAttribute }]
            }], euiSublabel: [{
                type: Input,
                args: [{ transform: booleanAttribute }]
            }] } });
/**
 * @description
 * Module that declares and exports the EuiLabelComponent.
 *
 * @deprecated Use {@link EUI_LABEL} instead
 */
class EuiLabelModule {
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: EuiLabelModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
    static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.17", ngImport: i0, type: EuiLabelModule, imports: [EuiLabelComponent], exports: [EuiLabelComponent] }); }
    static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: EuiLabelModule }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: EuiLabelModule, decorators: [{
            type: NgModule,
            args: [{
                    imports: [EuiLabelComponent],
                    exports: [EuiLabelComponent],
                }]
        }] });

const EUI_LABEL = [
    EuiLabelComponent,
];
// export { EuiLabelComponent as EuiLabel } from './eui-label.component';

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

export { EUI_LABEL, EuiLabelComponent, EuiLabelModule };
//# sourceMappingURL=eui-components-eui-label.mjs.map
