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

/**
 * @description
 * EuiBlockDocumentComponent creates a document overlay that can be toggled into
 * a blocked state. When blocked, a loading indicator is displayed.
 * Uses OnPush change detection strategy for better performance.
 */
class EuiBlockDocumentComponent {
    constructor() {
        /**
         * Controls whether the document is in blocked state.
         * When true, displays the loading indicator.
         *
         * @default false
         */
        this.isBlocked = false;
        /**
         * ARIA role for the document component.
         *
         * @default 'region'
         */
        this.role = 'region';
        /**
         * ARIA label for the document component.
         *
         * @default 'eUI Block Document'
         */
        this.ariaLabel = 'eUI Block Document';
    }
    /**
     * Applies CSS classes to the host element.
     * Always includes 'eui-block-document' and conditionally adds
     * 'eui-block-document--blocked' when isBlocked is true.
     *
     * @returns String of space-separated CSS classes
     */
    get cssClasses() {
        return [
            'eui-block-document',
            this.isBlocked ? 'eui-block-document--blocked' : '',
        ].join(' ').trim();
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: EuiBlockDocumentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "19.2.17", type: EuiBlockDocumentComponent, isStandalone: true, selector: "eui-block-document", inputs: { isBlocked: ["isBlocked", "isBlocked", booleanAttribute], ariaLabel: "ariaLabel" }, host: { properties: { "class": "this.cssClasses", "attr.role": "this.role", "attr.aria-label": "this.ariaLabel" } }, ngImport: i0, template: "<div class=\"eui-block-document__loader\"></div>\n", styles: [".eui-19 :host.eui-block-document .eui-block-document__loader{display:none}.eui-19 :host.eui-block-document--blocked .eui-block-document__loader{display:block;inset:0;margin:auto;overflow:show;position:fixed;z-index:var(--eui-zi-block-document)}.eui-19 :host.eui-block-document--blocked .eui-block-document__loader:before{background-color:#0000001a;content:\"\";display:block;height:100%;left:0;position:fixed;top:0;width:100%}.eui-19 :host.eui-block-document--blocked .eui-block-document__loader:not(:required){background-color:transparent;border:var(--eui-bw-none);color:transparent;font:0/0 a;text-shadow:none}.eui-19 :host.eui-block-document--blocked .eui-block-document__loader:not(:required):after{border-top:var(--eui-s-xs) solid currentcolor;border-right:var(--eui-s-xs) solid currentcolor;border-bottom-style:solid;border-left-style:solid;border-radius:var(--eui-br-max);border-bottom-width:var(--eui-s-xs);border-left-width:var(--eui-s-xs);border-bottom-color:#0003;border-left-color:#0003;color:var(--eui-c-s-primary-base);-webkit-animation:spin .65s linear infinite;animation:spin .65s linear infinite;display:block;left:50%;margin:-40px 0 0 -40px;top:50%;content:\"\";position:absolute;height:120px;width:120px}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: EuiBlockDocumentComponent, decorators: [{
            type: Component,
            args: [{ selector: 'eui-block-document', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"eui-block-document__loader\"></div>\n", styles: [".eui-19 :host.eui-block-document .eui-block-document__loader{display:none}.eui-19 :host.eui-block-document--blocked .eui-block-document__loader{display:block;inset:0;margin:auto;overflow:show;position:fixed;z-index:var(--eui-zi-block-document)}.eui-19 :host.eui-block-document--blocked .eui-block-document__loader:before{background-color:#0000001a;content:\"\";display:block;height:100%;left:0;position:fixed;top:0;width:100%}.eui-19 :host.eui-block-document--blocked .eui-block-document__loader:not(:required){background-color:transparent;border:var(--eui-bw-none);color:transparent;font:0/0 a;text-shadow:none}.eui-19 :host.eui-block-document--blocked .eui-block-document__loader:not(:required):after{border-top:var(--eui-s-xs) solid currentcolor;border-right:var(--eui-s-xs) solid currentcolor;border-bottom-style:solid;border-left-style:solid;border-radius:var(--eui-br-max);border-bottom-width:var(--eui-s-xs);border-left-width:var(--eui-s-xs);border-bottom-color:#0003;border-left-color:#0003;color:var(--eui-c-s-primary-base);-webkit-animation:spin .65s linear infinite;animation:spin .65s linear infinite;display:block;left:50%;margin:-40px 0 0 -40px;top:50%;content:\"\";position:absolute;height:120px;width:120px}\n"] }]
        }], propDecorators: { cssClasses: [{
                type: HostBinding,
                args: ['class']
            }], isBlocked: [{
                type: Input,
                args: [{ transform: booleanAttribute }]
            }], role: [{
                type: HostBinding,
                args: ['attr.role']
            }], ariaLabel: [{
                type: Input
            }, {
                type: HostBinding,
                args: ['attr.aria-label']
            }] } });

/**
 * EuiBlockDocumentModule is an Angular module that declares and exports the EuiBlockDocumentComponent.
 *
 * @deprecated Use {@link EUI_BLOCK_DOCUMENT} instead.
 */
class EuiBlockDocumentModule {
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: EuiBlockDocumentModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
    static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.17", ngImport: i0, type: EuiBlockDocumentModule, imports: [EuiBlockDocumentComponent], exports: [EuiBlockDocumentComponent] }); }
    static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: EuiBlockDocumentModule }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: EuiBlockDocumentModule, decorators: [{
            type: NgModule,
            args: [{
                    imports: [EuiBlockDocumentComponent],
                    exports: [EuiBlockDocumentComponent],
                }]
        }] });

const EUI_BLOCK_DOCUMENT = [
    EuiBlockDocumentComponent,
];
// export { EuiBlockDocumentComponent as EuiBlockDocument } from './eui-block-document.component';

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

export { EUI_BLOCK_DOCUMENT, EuiBlockDocumentComponent, EuiBlockDocumentModule };
//# sourceMappingURL=eui-components-eui-block-document.mjs.map
