import { ChangeDetectionStrategy, Component, HostBinding, ViewEncapsulation, ContentChild, } from '@angular/core';
import { BaseStatesDirective } from '../base-states.directive';
import { EuimCardImageDirective } from './euim-card-image/euim-card-image.directive';
import * as i0 from "@angular/core";
import * as i1 from "../base-states.directive";
import * as i2 from "@ionic/angular";
export class EuimCardComponent {
    get cssClasses() {
        return this.getCssClasses();
    }
    constructor(baseStatesDirective) {
        this.baseStatesDirective = baseStatesDirective;
    }
    getCssClasses() {
        return [
            this.baseStatesDirective.getCssClasses('euim-card'),
        ].join(' ').trim();
    }
    ngAfterContentInit() {
        if (this.cardImageDirective?.euimCardImageWidth) {
            this.imageWidth = this.cardImageDirective.euimCardImageWidth;
        }
    }
    /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: EuimCardComponent, deps: [{ token: i1.BaseStatesDirective }], target: i0.ɵɵFactoryTarget.Component }); }
    /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: EuimCardComponent, selector: "euim-card", host: { properties: { "class": "this.cssClasses" } }, queries: [{ propertyName: "cardImageDirective", first: true, predicate: EuimCardImageDirective, descendants: true }], hostDirectives: [{ directive: i1.BaseStatesDirective, inputs: ["euimSizeM", "euimSizeM", "euimSizeS", "euimSizeS", "euimSizeL", "euimSizeL"] }], ngImport: i0, template: "<ion-card [style.width]=\"imageWidth ? imageWidth : ''\">\n    <ng-content select=\"[euimCardImage]\"></ng-content>\n    <div class=\"euim-card__content\">\n        <ng-content></ng-content>\n    </div>\n</ion-card>\n", styles: [".euim-card{position:relative}.euim-card ion-card{margin:0;width:100%}.euim-card__header-image{width:100%}.euim-card__image{height:100%;width:100%;object-fit:cover}.euim-card__content ion-item>ion-button[slot=end]{margin:0}.euim-card__content ion-item>ion-button[slot=end]::part(native){padding:0}.euim-card--size-s .euim-card__image{height:calc(var(--eui-s-m) * 6.25)}.euim-card--size-s .euim-card__image[style*=--euimImageHeight]{height:var(--euimImageHeight)}.euim-card--size-s .euim-card__image[style*=--euimImageWidth]{width:var(--euimImageWidth)}.euim-card--size-s .euim-card__content ion-item{--inner-padding-end: 0;--padding-start: 0;padding:0 var(--eui-s-m);min-width:calc(var(--eui-s-m) * 6.875 + 1px)}.euim-card--size-s .euim-card__content ion-item::part(native){padding:0}.euim-card--size-s .euim-card__content ion-item:has([slot=end]){padding:0 0 0 var(--eui-s-m);min-width:calc(var(--eui-s-m) * 6.875 + 17px)}.euim-card--size-m .euim-card__image{height:calc(var(--eui-s-m) * 8)}.euim-card--size-m .euim-card__image[style*=--euimImageHeight]{height:var(--euimImageHeight)}.euim-card--size-m .euim-card__image[style*=--euimImageWidth]{width:var(--euimImageWidth)}.euim-card--size-m .euim-card__content ion-item{--inner-padding-end: 0;--padding-start: 0;padding:0 var(--eui-s-m);min-width:calc(var(--eui-s-m) * 9.625 + 1px)}.euim-card--size-m .euim-card__content ion-item::part(native){padding:0}.euim-card--size-m .euim-card__content ion-item:has([slot=end]){padding:0 0 0 var(--eui-s-m);min-width:calc(var(--eui-s-m) * 9.625 + 17px);width:211px}\n"], dependencies: [{ kind: "component", type: i2.IonCard, selector: "ion-card", inputs: ["button", "color", "disabled", "download", "href", "mode", "rel", "routerAnimation", "routerDirection", "target", "type"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: EuimCardComponent, decorators: [{
            type: Component,
            args: [{ selector: 'euim-card', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, hostDirectives: [
                        {
                            directive: BaseStatesDirective,
                            inputs: [
                                'euimSizeM',
                                'euimSizeS',
                                'euimSizeL',
                            ],
                        },
                    ], template: "<ion-card [style.width]=\"imageWidth ? imageWidth : ''\">\n    <ng-content select=\"[euimCardImage]\"></ng-content>\n    <div class=\"euim-card__content\">\n        <ng-content></ng-content>\n    </div>\n</ion-card>\n", styles: [".euim-card{position:relative}.euim-card ion-card{margin:0;width:100%}.euim-card__header-image{width:100%}.euim-card__image{height:100%;width:100%;object-fit:cover}.euim-card__content ion-item>ion-button[slot=end]{margin:0}.euim-card__content ion-item>ion-button[slot=end]::part(native){padding:0}.euim-card--size-s .euim-card__image{height:calc(var(--eui-s-m) * 6.25)}.euim-card--size-s .euim-card__image[style*=--euimImageHeight]{height:var(--euimImageHeight)}.euim-card--size-s .euim-card__image[style*=--euimImageWidth]{width:var(--euimImageWidth)}.euim-card--size-s .euim-card__content ion-item{--inner-padding-end: 0;--padding-start: 0;padding:0 var(--eui-s-m);min-width:calc(var(--eui-s-m) * 6.875 + 1px)}.euim-card--size-s .euim-card__content ion-item::part(native){padding:0}.euim-card--size-s .euim-card__content ion-item:has([slot=end]){padding:0 0 0 var(--eui-s-m);min-width:calc(var(--eui-s-m) * 6.875 + 17px)}.euim-card--size-m .euim-card__image{height:calc(var(--eui-s-m) * 8)}.euim-card--size-m .euim-card__image[style*=--euimImageHeight]{height:var(--euimImageHeight)}.euim-card--size-m .euim-card__image[style*=--euimImageWidth]{width:var(--euimImageWidth)}.euim-card--size-m .euim-card__content ion-item{--inner-padding-end: 0;--padding-start: 0;padding:0 var(--eui-s-m);min-width:calc(var(--eui-s-m) * 9.625 + 1px)}.euim-card--size-m .euim-card__content ion-item::part(native){padding:0}.euim-card--size-m .euim-card__content ion-item:has([slot=end]){padding:0 0 0 var(--eui-s-m);min-width:calc(var(--eui-s-m) * 9.625 + 17px);width:211px}\n"] }]
        }], ctorParameters: () => [{ type: i1.BaseStatesDirective }], propDecorators: { cardImageDirective: [{
                type: ContentChild,
                args: [EuimCardImageDirective]
            }], cssClasses: [{
                type: HostBinding,
                args: ['class']
            }] } });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXVpbS1jYXJkLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3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