import { ChangeDetectionStrategy, Component, Input } from '@angular/core';
import { AvatarType } from '@aztrix/components/avatar';
import { getLatestOrDefaultLanguage } from '@aztrix/helpers';
import { ProposalRepresentation } from '@aztrix/sdk';
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.12", ngImport: i0, type: ProposalCellViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", 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"] }, { 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.12", 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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHJvcG9zYWwtY2VsbC12aWV3LmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL2xpYnMvY29tcG9uZW50cy9yb3ctY2VsbC12aWV3L3Byb3Bvc2FsLWNlbGwtdmlldy9wcm9wb3NhbC1jZWxsLXZpZXcuY29tcG9uZW50LnRzIiwiLi4vLi4vLi4vLi4vLi4vLi4vbGlicy9jb21wb25lbnRzL3Jvdy1jZWxsLXZpZXcvcHJvcG9zYWwtY2VsbC12aWV3L3Byb3Bvc2FsLWNlbGwtdmlldy5jb21wb25lbnQuaHRtbCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUMsdUJBQXVCLEVBQUUsU0FBUyxFQUFFLEtBQUssRUFBQyxNQUFNLGVBQWUsQ0FBQztBQUN4RSxPQUFPLEVBQUMsVUFBVSxFQUFDLE1BQU0sMkJBQTJCLENBQUM7QUFDckQsT0FBTyxFQUFDLDBCQUEwQixFQUFDLE1BQU0saUJBQWlCLENBQUM7QUFDM0QsT0FBTyxFQUFDLHNCQUFzQixFQUFDLE1BQU0sYUFBYSxDQUFDOzs7Ozs7QUFRbkQsTUFBTSxPQUFPLHlCQUF5QjtJQU50QztRQVVFLGVBQVUsR0FBRyxVQUFVLENBQUM7S0FLekI7SUFIQyxJQUFJLFlBQVk7UUFDZCxPQUFPLDBCQUEwQixDQUFDLElBQUksQ0FBQyxRQUFRLEVBQUUsSUFBSSxDQUFDLFlBQVksQ0FBQyxFQUFFLE1BQU0sQ0FBQztJQUM5RSxDQUFDOytHQVJVLHlCQUF5QjttR0FBekIseUJBQXlCLDZIQ1h0QyxpckJBcUJBOzs0RkRWYSx5QkFBeUI7a0JBTnJDLFNBQVM7K0J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