import { Component, EventEmitter, Input, Output } from "@angular/core"; @Component({ selector: "selectable-avatar", template: ` `, }) export class SelectableAvatarComponent { @Input() id: string; @Input() text: string; @Input() title: string; @Input() color: string; @Input() border = false; @Input() selected = false; @Output() select = new EventEmitter(); onFire() { this.select.emit(this.color); } get classList() { return ["tw-rounded-full tw-inline-block"] .concat(["tw-cursor-pointer", "tw-outline", "tw-outline-solid", "tw-outline-offset-1"]) .concat( this.selected ? ["tw-outline-[3px]", "tw-outline-primary-600"] : [ "tw-outline-0", "hover:tw-outline-1", "hover:tw-outline-primary-300", "focus:tw-outline-2", "focus:tw-outline-primary-600", ], ); } }