import { Component, Input } from '@angular/core';
import { AbstractSelectSearch } from '../abstract-select-search';
import * as i0 from "@angular/core";
import * as i1 from "@angular/common";
import * as i2 from "../select-search/select-search.component";
import * as i3 from "@aztrix/components/row-cell-view";
import * as i4 from "@aztrix/helpers";
export class AgreementSelectSearchComponent extends AbstractSelectSearch {
}
AgreementSelectSearchComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.5", ngImport: i0, type: AgreementSelectSearchComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
AgreementSelectSearchComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.5", type: AgreementSelectSearchComponent, selector: "ax-agreement-select-search", inputs: { proposal: "proposal", agreements: "agreements" }, usesInheritance: true, ngImport: i0, template: "<ng-template #option let-result>\n  <ax-agreement-cell-view *ngIf=\"result\" [agreement]=\"result\" [proposal]=\"proposal\">\n    <div class=\"status\" *ngIf=\"result.agreementData?.confirmed\">\n      <span>\n        {{ result.active ? ('agreement.active' | translate) : ('agreement.expired' | translate) }}\n      </span>\n      <div class=\"status-indicator\" [ngClass]=\"{'is-expired': result.expirationTimestamp}\"></div>\n    </div>\n    <div class=\"status\" *ngIf=\"!result.agreementData?.confirmed\">\n      <span>{{ 'agreement.status.not-confirmed' | translate }}</span>\n      <div class=\"status-indicator is-pending\"></div>\n    </div>\n  </ax-agreement-cell-view>\n</ng-template>\n\n<ng-template #selectedViewTemplate let-result>\n  <ax-agreement-cell-view\n    class=\"selected\"\n    *ngIf=\"result\"\n    [agreement]=\"result\"\n    [noAvatar]=\"true\"\n    [proposal]=\"proposal\"\n  ></ax-agreement-cell-view>\n</ng-template>\n\n<ax-select-search\n  [form]=\"form\"\n  [options]=\"agreements\"\n  [placeholder]=\"(multiple ? 'label.agreements' : 'label.agreement') | translate\"\n  [optionTemplate]=\"option\"\n  [selectedValueTemplate]=\"selectedViewTemplate\"\n  [multiple]=\"multiple\"\n  [valueCallback]=\"valueCallback\"\n  [label]=\"label ? label : ((multiple ? 'label.agreements' : 'label.agreement') | translate)\"\n></ax-select-search>\n", styles: [".status{display:flex;align-items:center}.status-indicator{background-color:var(--primary-color-500);width:8px;height:8px;border-radius:6px;margin:0 6px}.status-indicator.is-pending{background-color:#e67e22}.status-indicator.is-expired{background-color:var(--warn-color-500)}.selected{height:38px}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.SelectSearchComponent, selector: "ax-select-search", inputs: ["form", "options", "placeholder", "optionTemplate", "selectedValueTemplate", "multiple", "label", "keys", "canAddNew", "required", "appearance", "errorsTemplate", "prefixTemplate", "disabled", "valueCallback", "searchCallback$"], outputs: ["addNewValue"] }, { kind: "component", type: i3.AgreementCellViewComponent, selector: "ax-agreement-cell-view", inputs: ["proposal", "agreement", "noAvatar"] }, { kind: "pipe", type: i4.TranslatePipe, name: "translate" }] });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.5", ngImport: i0, type: AgreementSelectSearchComponent, decorators: [{
            type: Component,
            args: [{ selector: 'ax-agreement-select-search', template: "<ng-template #option let-result>\n  <ax-agreement-cell-view *ngIf=\"result\" [agreement]=\"result\" [proposal]=\"proposal\">\n    <div class=\"status\" *ngIf=\"result.agreementData?.confirmed\">\n      <span>\n        {{ result.active ? ('agreement.active' | translate) : ('agreement.expired' | translate) }}\n      </span>\n      <div class=\"status-indicator\" [ngClass]=\"{'is-expired': result.expirationTimestamp}\"></div>\n    </div>\n    <div class=\"status\" *ngIf=\"!result.agreementData?.confirmed\">\n      <span>{{ 'agreement.status.not-confirmed' | translate }}</span>\n      <div class=\"status-indicator is-pending\"></div>\n    </div>\n  </ax-agreement-cell-view>\n</ng-template>\n\n<ng-template #selectedViewTemplate let-result>\n  <ax-agreement-cell-view\n    class=\"selected\"\n    *ngIf=\"result\"\n    [agreement]=\"result\"\n    [noAvatar]=\"true\"\n    [proposal]=\"proposal\"\n  ></ax-agreement-cell-view>\n</ng-template>\n\n<ax-select-search\n  [form]=\"form\"\n  [options]=\"agreements\"\n  [placeholder]=\"(multiple ? 'label.agreements' : 'label.agreement') | translate\"\n  [optionTemplate]=\"option\"\n  [selectedValueTemplate]=\"selectedViewTemplate\"\n  [multiple]=\"multiple\"\n  [valueCallback]=\"valueCallback\"\n  [label]=\"label ? label : ((multiple ? 'label.agreements' : 'label.agreement') | translate)\"\n></ax-select-search>\n", styles: [".status{display:flex;align-items:center}.status-indicator{background-color:var(--primary-color-500);width:8px;height:8px;border-radius:6px;margin:0 6px}.status-indicator.is-pending{background-color:#e67e22}.status-indicator.is-expired{background-color:var(--warn-color-500)}.selected{height:38px}\n"] }]
        }], propDecorators: { proposal: [{
                type: Input
            }], agreements: [{
                type: Input
            }] } });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWdyZWVtZW50LXNlbGVjdC1zZWFyY2guY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vbGlicy9jb21wb25lbnRzL3NlbGVjdC1zZWFyY2gvYWdyZWVtZW50LXNlbGVjdC1zZWFyY2gvYWdyZWVtZW50LXNlbGVjdC1zZWFyY2guY29tcG9uZW50LnRzIiwiLi4vLi4vLi4vLi4vLi4vLi4vbGlicy9jb21wb25lbnRzL3NlbGVjdC1zZWFyY2gvYWdyZWVtZW50LXNlbGVjdC1zZWFyY2gvYWdyZWVtZW50LXNlbGVjdC1zZWFyY2guY29tcG9uZW50Lmh0bWwiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFDLFNBQVMsRUFBRSxLQUFLLEVBQUMsTUFBTSxlQUFlLENBQUM7QUFHL0MsT0FBTyxFQUFDLG9CQUFvQixFQUFDLE1BQU0sMkJBQT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