import { ChangeDetectionStrategy, Component, Input } from '@angular/core';
import { AvatarType } from '@aztrix/components/avatar';
import { getLatestOrDefaultLanguage } from '@aztrix/helpers';
import * as i0 from "@angular/core";
import * as i1 from "@angular/common";
import * as i2 from "@aztrix/components/avatar";
import * as i3 from "../row-cell-view.component";
import * as i4 from "@aztrix/helpers";
export class ProposalCellViewComponent {
    constructor() {
        this.AvatarType = AvatarType;
    }
    get avatarSource() {
        return getLatestOrDefaultLanguage(this.proposal, this.languageCode)?.avatar;
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: ProposalCellViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.11", type: ProposalCellViewComponent, selector: "ax-proposal-cell-view", inputs: { proposal: "proposal", languageCode: "languageCode" }, ngImport: i0, template: "<div class=\"proposal-value-view\">\n  <ax-row-cell-view class=\"row-cell-view\">\n    <div class=\"row-cell-view-left\">\n      <div class=\"avatar-wrapper\">\n        <ax-avatar\n          [type]=\"AvatarType.PROPOSAL\"\n          [iconColor]=\"'avatar-bg--green'\"\n          icon=\"file-document-edit\"\n          [source]=\"avatarSource\"\n          [round]=\"false\"\n        ></ax-avatar>\n      </div>\n    </div>\n    <div class=\"row-cell-view-middle\">\n      <span *ngIf=\"proposal\" class=\"property-value\">{{ proposal | displayName }}</span>\n    </div>\n    <div class=\"row-cell-view-right\">\n      <ng-content></ng-content>\n    </div>\n  </ax-row-cell-view>\n</div>\n", styles: [":host ::ng-deep .proposal-value-view .row-cell-view{background-color:inherit}:host ::ng-deep .proposal-value-view .avatar-dynamic{position:relative}:host ::ng-deep .proposal-value-view .avatar-icon{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);font-size:25px}:host ::ng-deep .proposal-value-view .avatar-icon .mat-icon{margin-right:0}.row-cell-view-middle{max-width:100%;overflow:hidden;text-overflow:ellipsis}\n", ".row-cell-view{gap:10px}.avatar-wrapper{width:40px;height:40px}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.AvatarComponent, selector: "ax-avatar", inputs: ["source", "type", "icon", "iconColor", "badge", "badgeColor", "border", "round", "rounded", "published"] }, { kind: "component", type: i3.RowCellViewComponent, selector: "ax-row-cell-view" }, { kind: "pipe", type: i4.DisplayNamePipe, name: "displayName" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: ProposalCellViewComponent, decorators: [{
            type: Component,
            args: [{ selector: 'ax-proposal-cell-view', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"proposal-value-view\">\n  <ax-row-cell-view class=\"row-cell-view\">\n    <div class=\"row-cell-view-left\">\n      <div class=\"avatar-wrapper\">\n        <ax-avatar\n          [type]=\"AvatarType.PROPOSAL\"\n          [iconColor]=\"'avatar-bg--green'\"\n          icon=\"file-document-edit\"\n          [source]=\"avatarSource\"\n          [round]=\"false\"\n        ></ax-avatar>\n      </div>\n    </div>\n    <div class=\"row-cell-view-middle\">\n      <span *ngIf=\"proposal\" class=\"property-value\">{{ proposal | displayName }}</span>\n    </div>\n    <div class=\"row-cell-view-right\">\n      <ng-content></ng-content>\n    </div>\n  </ax-row-cell-view>\n</div>\n", styles: [":host ::ng-deep .proposal-value-view .row-cell-view{background-color:inherit}:host ::ng-deep .proposal-value-view .avatar-dynamic{position:relative}:host ::ng-deep .proposal-value-view .avatar-icon{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);font-size:25px}:host ::ng-deep .proposal-value-view .avatar-icon .mat-icon{margin-right:0}.row-cell-view-middle{max-width:100%;overflow:hidden;text-overflow:ellipsis}\n", ".row-cell-view{gap:10px}.avatar-wrapper{width:40px;height:40px}\n"] }]
        }], propDecorators: { proposal: [{
                type: Input
            }], languageCode: [{
                type: Input
            }] } });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHJvcG9zYWwtY2VsbC12aWV3LmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL2xpYnMvY29tcG9uZW50cy9yb3ctY2VsbC12aWV3L3Byb3Bvc2FsLWNlbGwtdmlldy9wcm9wb3NhbC1jZWxsLXZpZXcuY29tcG9uZW50LnRzIiwiLi4vLi4vLi4vLi4vLi4vLi4vbGlicy9jb21wb25lbnRzL3Jvdy1jZWxsLXZpZXcvcHJvcG9zYWwtY2VsbC12aWV3L3Byb3Bvc2FsLWNlbGwtdmlldy5jb21wb25lbnQuaHRtbCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUMsdUJBQXVCLEVBQUUsU0FBUyxFQUFFLEtBQUssRUFBQyxNQUFNLGVBQWUsQ0FBQztBQUN4RSxPQUFPLEVBQUMsVUFBVSxFQUFDLE1BQU0sMkJBQTJCLENBQUM7QUFDckQsT0FBTyxFQUFDLDBCQUEwQixFQUFDLE1BQU0saUJBQWlCLENBQUM7Ozs7OztBQVMzRCxNQUFNLE9BQU8seUJBQXlCO0lBTnRDO1FBVUUsZUFBVSxHQUFHLFVBQVUsQ0FBQztLQUt6QjtJQUhDLElBQUksWUFBWTtRQUNkLE9BQU8sMEJBQTBCLENBQUMsSUFBSSxDQUFDLFFBQVEsRUFBRSxJQUFJLENBQUMsWUFBWSxDQUFDLEVBQUUsTUFBTSxDQUFDO0lBQzlFLENBQUM7K0dBUlUseUJBQXlCO21HQUF6Qix5QkFBeUIsNkhDWHRDLGlyQkFxQkE7OzRGRFZhLHlCQUF5QjtrQkFOckMsU0FBUzsrQkFDRSx1QkFBdUIsbUJBR2hCLHVCQUF1QixDQUFDLE1BQU07OEJBR3RDLFFBQVE7c0JBQWhCLEtBQUs7Z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