/*
 * Copyright 2015-2024 Ritense BV, the Netherlands.
 *
 * Licensed under EUPL, Version 1.2 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" basis,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
import { Component, EventEmitter, Input, Output } from '@angular/core';
import * as i0 from "@angular/core";
import * as i1 from "@angular/common";
import * as i2 from "ngx-skeleton-loader";
import * as i3 from "@ngx-translate/core";
/**
 * @deprecated Migrate old design to Carbon
 */
export class VCardComponent {
    constructor() {
        this.titleTranslationKey = '';
        this.title = '';
        this.descriptionTranslationKey = '';
        this.description = '';
        this.selectable = false;
        this.selected = false;
        this.fullHeight = false;
        this.loading = false;
        this.loadingTitle = false;
        this.loadingDescription = false;
        this.selectEvent = new EventEmitter();
        this.deselectEvent = new EventEmitter();
    }
    click() {
        if (this.selectable) {
            if (this.selected) {
                this.deselectEvent.emit();
            }
            else {
                this.selectEvent.emit();
            }
        }
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: VCardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: VCardComponent, selector: "v-card", inputs: { titleTranslationKey: "titleTranslationKey", title: "title", descriptionTranslationKey: "descriptionTranslationKey", description: "description", selectable: "selectable", selected: "selected", fullHeight: "fullHeight", loading: "loading", loadingTitle: "loadingTitle", loadingDescription: "loadingDescription" }, outputs: { selectEvent: "selectEvent", deselectEvent: "deselectEvent" }, ngImport: i0, template: "<!--\n  ~ Copyright 2015-2024 Ritense BV, the Netherlands.\n  ~\n  ~ Licensed under EUPL, Version 1.2 (the \"License\");\n  ~ you may not use this file except in compliance with the License.\n  ~ You may obtain a copy of the License at\n  ~\n  ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n  ~\n  ~ Unless required by applicable law or agreed to in writing, software\n  ~ distributed under the License is distributed on an \"AS IS\" basis,\n  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n  ~ See the License for the specific language governing permissions and\n  ~ limitations under the License.\n  -->\n\n<div\n  class=\"v-card\"\n  [ngClass]=\"{\n    'v-card--selectable': selectable,\n    'v-card--selected': selected,\n    'v-card--full-height': fullHeight,\n  }\"\n  (click)=\"click()\"\n>\n  <ng-content select=\"div[role=header]\"></ng-content>\n  <div class=\"v-card__body\">\n    <ng-container *ngTemplateOutlet=\"cardTitle\"></ng-container>\n    <ng-container *ngTemplateOutlet=\"cardTitleLoading\"></ng-container>\n    <ng-container *ngTemplateOutlet=\"cardDescription\"></ng-container>\n    <ng-container *ngTemplateOutlet=\"cardDescriptionLoading\"></ng-container>\n  </div>\n</div>\n\n<ng-template #cardTitle>\n  <h2 class=\"v-card__title\" *ngIf=\"!loading && (titleTranslationKey || title)\">\n    {{ titleTranslationKey ? (titleTranslationKey | translate) : title }}\n  </h2>\n</ng-template>\n\n<ng-template #cardTitleLoading>\n  <h2 class=\"v-card__title\" *ngIf=\"loading && loadingTitle\">\n    <ngx-skeleton-loader\n      appearance=\"line\"\n      [theme]=\"{\n        width: 'var(--v-card-title-loading-skeleton-width)',\n        height: 'var(--v-card-title-line-height)',\n        margin: '0',\n        'background-color': 'var(--v-card-loading-skeleton-bg-color)',\n      }\"\n    ></ngx-skeleton-loader>\n  </h2>\n</ng-template>\n\n<ng-template #cardDescription>\n  <p class=\"v-card__description\" *ngIf=\"!loading && (descriptionTranslationKey || description)\">\n    {{ descriptionTranslationKey ? (descriptionTranslationKey | translate) : description }}\n  </p>\n</ng-template>\n\n<ng-template #cardDescriptionLoading>\n  <p class=\"v-card__description\" *ngIf=\"loading && loadingDescription\">\n    <ngx-skeleton-loader\n      appearance=\"line\"\n      count=\"3\"\n      [theme]=\"{\n        width: '100%',\n        height: 'var(--v-card-description-line-height)',\n        margin: '0',\n        'background-color': 'var(--v-card-loading-skeleton-bg-color)',\n      }\"\n    ></ngx-skeleton-loader>\n  </p>\n</ng-template>\n", styles: [".v-card{width:100%;padding-inline-start:var(--v-card-padding-inline);padding-inline-end:var(--v-card-padding-inline);padding-block-start:var(--v-card-padding-block-start);padding-block-end:var(--v-card-padding-block-end);border-radius:var(--v-card-border-radius);outline:var(--v-card-border);background-color:var(--v-card-bg-color);transition:var(--v-card-transition)}.v-card--selectable{-webkit-user-select:none;user-select:none;cursor:var(--v-card-selectable-cursor)}.v-card--selectable:hover{background-color:var(--v-card-selectable-hover-bg-color)}.v-card--selected{outline:var(--v-card-selected-border)}.v-card--full-height{height:100%}.v-card__title{font-size:var(--v-card-title-font-size);line-height:var(--v-card-title-line-height);color:var(--v-card-title-color);font-weight:var(--v-card-title-font-weight);margin:0;margin-block-end:var(--v-card-title-spacing-block);overflow:hidden;text-overflow:ellipsis}.v-card__description{font-size:var(--v-card-description-font-size);line-height:var(--v-card-description-line-height);color:var(--v-card-description-color);font-weight:var(--v-card-description-font-weight);margin:0;overflow:hidden;text-overflow:ellipsis}::ng-deep .v-card div[role=header]{display:flex;align-items:center;justify-content:center;width:calc(100% + var(--v-card-padding-inline) * 2);background-color:var(--v-card-header-bg-color);margin-block-start:calc(0px - var(--v-card-padding-block-start));margin-inline-start:calc(0px - var(--v-card-padding-inline));padding-inline-start:var(--v-card-header-padding-inline);padding-inline-end:var(--v-card-header-padding-inline);padding-block-start:var(--v-card-header-padding-block);padding-block-end:var(--v-card-header-padding-block);margin-block-end:var(--v-card-header-margin-block-end);border-bottom:var(--v-card-header-border);transition:var(--v-card-transition)}::ng-deep .v-card--selectable:hover div[role=header]{background-color:var(--v-card-header-hover-bg-color)}\n/*!\n * Copyright 2015-2024 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i2.NgxSkeletonLoaderComponent, selector: "ngx-skeleton-loader", inputs: ["count", "loadingText", "appearance", "animation", "ariaLabel", "theme"] }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: VCardComponent, decorators: [{
            type: Component,
            args: [{ selector: 'v-card', template: "<!--\n  ~ Copyright 2015-2024 Ritense BV, the Netherlands.\n  ~\n  ~ Licensed under EUPL, Version 1.2 (the \"License\");\n  ~ you may not use this file except in compliance with the License.\n  ~ You may obtain a copy of the License at\n  ~\n  ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n  ~\n  ~ Unless required by applicable law or agreed to in writing, software\n  ~ distributed under the License is distributed on an \"AS IS\" basis,\n  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n  ~ See the License for the specific language governing permissions and\n  ~ limitations under the License.\n  -->\n\n<div\n  class=\"v-card\"\n  [ngClass]=\"{\n    'v-card--selectable': selectable,\n    'v-card--selected': selected,\n    'v-card--full-height': fullHeight,\n  }\"\n  (click)=\"click()\"\n>\n  <ng-content select=\"div[role=header]\"></ng-content>\n  <div class=\"v-card__body\">\n    <ng-container *ngTemplateOutlet=\"cardTitle\"></ng-container>\n    <ng-container *ngTemplateOutlet=\"cardTitleLoading\"></ng-container>\n    <ng-container *ngTemplateOutlet=\"cardDescription\"></ng-container>\n    <ng-container *ngTemplateOutlet=\"cardDescriptionLoading\"></ng-container>\n  </div>\n</div>\n\n<ng-template #cardTitle>\n  <h2 class=\"v-card__title\" *ngIf=\"!loading && (titleTranslationKey || title)\">\n    {{ titleTranslationKey ? (titleTranslationKey | translate) : title }}\n  </h2>\n</ng-template>\n\n<ng-template #cardTitleLoading>\n  <h2 class=\"v-card__title\" *ngIf=\"loading && loadingTitle\">\n    <ngx-skeleton-loader\n      appearance=\"line\"\n      [theme]=\"{\n        width: 'var(--v-card-title-loading-skeleton-width)',\n        height: 'var(--v-card-title-line-height)',\n        margin: '0',\n        'background-color': 'var(--v-card-loading-skeleton-bg-color)',\n      }\"\n    ></ngx-skeleton-loader>\n  </h2>\n</ng-template>\n\n<ng-template #cardDescription>\n  <p class=\"v-card__description\" *ngIf=\"!loading && (descriptionTranslationKey || description)\">\n    {{ descriptionTranslationKey ? (descriptionTranslationKey | translate) : description }}\n  </p>\n</ng-template>\n\n<ng-template #cardDescriptionLoading>\n  <p class=\"v-card__description\" *ngIf=\"loading && loadingDescription\">\n    <ngx-skeleton-loader\n      appearance=\"line\"\n      count=\"3\"\n      [theme]=\"{\n        width: '100%',\n        height: 'var(--v-card-description-line-height)',\n        margin: '0',\n        'background-color': 'var(--v-card-loading-skeleton-bg-color)',\n      }\"\n    ></ngx-skeleton-loader>\n  </p>\n</ng-template>\n", styles: [".v-card{width:100%;padding-inline-start:var(--v-card-padding-inline);padding-inline-end:var(--v-card-padding-inline);padding-block-start:var(--v-card-padding-block-start);padding-block-end:var(--v-card-padding-block-end);border-radius:var(--v-card-border-radius);outline:var(--v-card-border);background-color:var(--v-card-bg-color);transition:var(--v-card-transition)}.v-card--selectable{-webkit-user-select:none;user-select:none;cursor:var(--v-card-selectable-cursor)}.v-card--selectable:hover{background-color:var(--v-card-selectable-hover-bg-color)}.v-card--selected{outline:var(--v-card-selected-border)}.v-card--full-height{height:100%}.v-card__title{font-size:var(--v-card-title-font-size);line-height:var(--v-card-title-line-height);color:var(--v-card-title-color);font-weight:var(--v-card-title-font-weight);margin:0;margin-block-end:var(--v-card-title-spacing-block);overflow:hidden;text-overflow:ellipsis}.v-card__description{font-size:var(--v-card-description-font-size);line-height:var(--v-card-description-line-height);color:var(--v-card-description-color);font-weight:var(--v-card-description-font-weight);margin:0;overflow:hidden;text-overflow:ellipsis}::ng-deep .v-card div[role=header]{display:flex;align-items:center;justify-content:center;width:calc(100% + var(--v-card-padding-inline) * 2);background-color:var(--v-card-header-bg-color);margin-block-start:calc(0px - var(--v-card-padding-block-start));margin-inline-start:calc(0px - var(--v-card-padding-inline));padding-inline-start:var(--v-card-header-padding-inline);padding-inline-end:var(--v-card-header-padding-inline);padding-block-start:var(--v-card-header-padding-block);padding-block-end:var(--v-card-header-padding-block);margin-block-end:var(--v-card-header-margin-block-end);border-bottom:var(--v-card-header-border);transition:var(--v-card-transition)}::ng-deep .v-card--selectable:hover div[role=header]{background-color:var(--v-card-header-hover-bg-color)}\n/*!\n * Copyright 2015-2024 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n"] }]
        }], propDecorators: { titleTranslationKey: [{
                type: Input
            }], title: [{
                type: Input
            }], descriptionTranslationKey: [{
                type: Input
            }], description: [{
                type: Input
            }], selectable: [{
                type: Input
            }], selected: [{
                type: Input
            }], fullHeight: [{
                type: Input
            }], loading: [{
                type: Input
            }], loadingTitle: [{
                type: Input
            }], loadingDescription: [{
                type: Input
            }], selectEvent: [{
                type: Output
            }], deselectEvent: [{
                type: Output
            }] } });
//# sourceMappingURL=data:application/json;base64, 