import { Component, HostBinding, Input, ViewEncapsulation, ChangeDetectionStrategy, booleanAttribute, ViewChild } from '@angular/core';
import { IonicModule } from '@ionic/angular';
import { TranslateModule } from '@ngx-translate/core';
import * as i0 from "@angular/core";
import * as i1 from "@ionic/angular";
import * as i2 from "@ngx-translate/core";
export class EuimEmptyListPlaceholderComponent {
    get cssClasses() {
        return this.getCssClasses();
    }
    constructor(cdr) {
        this.cdr = cdr;
        this.isEmptyContent = true;
    }
    ngAfterViewInit() {
        this.isEmptyContent = this.contentWrapper.nativeElement.textContent.trim().length === 0;
        this.cdr.detectChanges();
    }
    getCssClasses() {
        return [
            'euim-empty-list-placeholder',
            this.euimMarginTopLarge ? 'euim-empty-list-placeholder--margin-top-large' : '',
            this.euimMarginTopSmall ? 'euim-empty-list-placeholder--margin-top-small' : '',
            this.euimMarginBottomSmall ? 'euim-empty-list-placeholder--margin-bottom-small' : '',
        ].join(' ');
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: EuimEmptyListPlaceholderComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: EuimEmptyListPlaceholderComponent, isStandalone: true, selector: "euim-empty-list-placeholder", inputs: { message: "message", icon: "icon", description: "description", button: "button", euimMarginTopLarge: ["euimMarginTopLarge", "euimMarginTopLarge", booleanAttribute], euimMarginTopSmall: ["euimMarginTopSmall", "euimMarginTopSmall", booleanAttribute], euimMarginBottomSmall: ["euimMarginBottomSmall", "euimMarginBottomSmall", booleanAttribute] }, host: { properties: { "class": "this.cssClasses" } }, viewQueries: [{ propertyName: "contentWrapper", first: true, predicate: ["contentWrapper"], descendants: true }], ngImport: i0, template: "@if (icon) {\n  <ion-icon [name]=\"icon\" class=\"euim-empty-list-placeholder__icon\"></ion-icon>\n}\n@if ((!icon && !message && !description && isEmptyContent)) {\n  <ion-icon name=\"search\"\n  class=\"euim-empty-list-placeholder__icon\"></ion-icon>\n}\n@if (message || (!icon && !message && !description) && isEmptyContent) {\n  <div class=\"euim-empty-list-placeholder__message\">\n    {{ message || 'euim.empty-list-placeholder.message' | translate }}\n  </div>\n}\n@if (description || (!icon && !message && !description) && isEmptyContent) {\n  <div class=\"euim-empty-list-placeholder__description\">\n    {{ description || 'euim.empty-list-placeholder.description' | translate }}\n  </div>\n}\n<div #contentWrapper>\n    <ng-content></ng-content>\n</div>\n\n", styles: [".euim-empty-list-placeholder div,.euim-empty-list-placeholder{width:100%;display:grid;grid-template-columns:1fr;grid-template-rows:auto;grid-column-gap:0;grid-row-gap:var(--eui-s-2xs);justify-content:center;justify-items:center;align-items:center;margin:auto}.euim-empty-list-placeholder div--margin-top-large,.euim-empty-list-placeholder--margin-top-large{margin-top:calc(9 * var(--eui-s-m))}.euim-empty-list-placeholder div--margin-top-small,.euim-empty-list-placeholder--margin-top-small{margin-top:var(--eui-s-m)}.euim-empty-list-placeholder div--margin-bottom-small,.euim-empty-list-placeholder--margin-bottom-small{margin-bottom:var(--eui-s-m)}.euim-empty-list-placeholder div__icon,.euim-empty-list-placeholder__icon{color:var(--eui-c-neutral-light);width:var(--eui-is-l);height:var(--eui-is-l)}.euim-empty-list-placeholder div__message,.euim-empty-list-placeholder__message{font:var(--eui-f-m-bold-compact);color:var(--eui-c-neutral-light)}.euim-empty-list-placeholder div__description,.euim-empty-list-placeholder__description{font:var(--eui-f-s-compact);color:var(--eui-c-neutral-light)}\n"], dependencies: [{ kind: "ngmodule", type: IonicModule }, { kind: "component", type: i1.IonIcon, selector: "ion-icon", inputs: ["color", "flipRtl", "icon", "ios", "lazy", "md", "mode", "name", "sanitize", "size", "src"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: EuimEmptyListPlaceholderComponent, decorators: [{
            type: Component,
            args: [{ selector: 'euim-empty-list-placeholder', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [IonicModule, TranslateModule], template: "@if (icon) {\n  <ion-icon [name]=\"icon\" class=\"euim-empty-list-placeholder__icon\"></ion-icon>\n}\n@if ((!icon && !message && !description && isEmptyContent)) {\n  <ion-icon name=\"search\"\n  class=\"euim-empty-list-placeholder__icon\"></ion-icon>\n}\n@if (message || (!icon && !message && !description) && isEmptyContent) {\n  <div class=\"euim-empty-list-placeholder__message\">\n    {{ message || 'euim.empty-list-placeholder.message' | translate }}\n  </div>\n}\n@if (description || (!icon && !message && !description) && isEmptyContent) {\n  <div class=\"euim-empty-list-placeholder__description\">\n    {{ description || 'euim.empty-list-placeholder.description' | translate }}\n  </div>\n}\n<div #contentWrapper>\n    <ng-content></ng-content>\n</div>\n\n", styles: [".euim-empty-list-placeholder div,.euim-empty-list-placeholder{width:100%;display:grid;grid-template-columns:1fr;grid-template-rows:auto;grid-column-gap:0;grid-row-gap:var(--eui-s-2xs);justify-content:center;justify-items:center;align-items:center;margin:auto}.euim-empty-list-placeholder div--margin-top-large,.euim-empty-list-placeholder--margin-top-large{margin-top:calc(9 * var(--eui-s-m))}.euim-empty-list-placeholder div--margin-top-small,.euim-empty-list-placeholder--margin-top-small{margin-top:var(--eui-s-m)}.euim-empty-list-placeholder div--margin-bottom-small,.euim-empty-list-placeholder--margin-bottom-small{margin-bottom:var(--eui-s-m)}.euim-empty-list-placeholder div__icon,.euim-empty-list-placeholder__icon{color:var(--eui-c-neutral-light);width:var(--eui-is-l);height:var(--eui-is-l)}.euim-empty-list-placeholder div__message,.euim-empty-list-placeholder__message{font:var(--eui-f-m-bold-compact);color:var(--eui-c-neutral-light)}.euim-empty-list-placeholder div__description,.euim-empty-list-placeholder__description{font:var(--eui-f-s-compact);color:var(--eui-c-neutral-light)}\n"] }]
        }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }], propDecorators: { message: [{
                type: Input
            }], icon: [{
                type: Input
            }], description: [{
                type: Input
            }], button: [{
                type: Input
            }], euimMarginTopLarge: [{
                type: Input,
                args: [{ transform: booleanAttribute }]
            }], euimMarginTopSmall: [{
                type: Input,
                args: [{ transform: booleanAttribute }]
            }], euimMarginBottomSmall: [{
                type: Input,
                args: [{ transform: booleanAttribute }]
            }], cssClasses: [{
                type: HostBinding,
                args: ['class']
            }], contentWrapper: [{
                type: ViewChild,
                args: ['contentWrapper']
            }] } });
//# sourceMappingURL=data:application/json;base64, 