2021-01-17 10:56:33 +01:00
|
|
|
import {SearchQueryTypes} from './SearchQueryDTO';
|
2016-05-04 17:20:21 +02:00
|
|
|
|
2021-03-20 20:15:49 +01:00
|
|
|
export interface IAutoCompleteItem {
|
|
|
|
text: string;
|
|
|
|
type?: SearchQueryTypes;
|
|
|
|
}
|
|
|
|
|
|
|
|
export class AutoCompleteItem implements IAutoCompleteItem {
|
2021-03-20 14:37:56 +01:00
|
|
|
constructor(public text: string, public type: SearchQueryTypes = null) {
|
2017-06-10 22:32:56 +02:00
|
|
|
}
|
2016-05-15 19:36:23 +02:00
|
|
|
|
2021-04-18 15:48:35 +02:00
|
|
|
equals(other: AutoCompleteItem): boolean {
|
2017-06-10 22:32:56 +02:00
|
|
|
return this.text === other.text && this.type === other.type;
|
|
|
|
}
|
2016-05-04 17:20:21 +02:00
|
|
|
}
|
|
|
|
|