import { Picker } from '../util';

export enum ParticipantSearchOptions {
    DisplayName = 'DisplayName',
    IdentificationCode = 'IdentificationCode',
    IdentificationCodeStartsWith = 'IdentificationCodeStartsWith',
}

export interface ParticipantSearchModel {
    text: string;
    criteria: ParticipantSearchOptions;
    eventId: number;
}

export interface ParticipantSearchAllModel extends ParticipantSearchModel {
    qualificationId: string;
    functionId: string;
    unitRegistrationNumber: string;
    onlyDirectUnits: boolean;
}

export const ParticipantSearchCriteria: Array<Picker> = [
    { key: ParticipantSearchOptions.DisplayName, label: 'Hledat podle jména' },
    { key: ParticipantSearchOptions.IdentificationCode, label: 'Hledat podle RČ' },
    { key: ParticipantSearchOptions.IdentificationCodeStartsWith, label: 'Hledat podle začátku RČ' },
];