import { Tag, ThemeGroups } from './tags';

export type GeneralFilter = Filter & AdditionalFilter;

export type Filter = {
    themesTagIds?: number[];
    priceFrom?: number | null;
    priceTo?: number | null;
    durationFrom?: number | null;
    durationTo?: number | null;
    userLanguages?: string[];
    pageSize?: number;
    page?: number;
    tagLanguage?: string;
};

export type AdditionalFilter = {
    text?: string;
    coachSort?: string;
};

export type File = {
    id: number;
    fileType: string;
    url: string;
};

export interface ExpertDocument {
    fileName: string;
    original?: File;
    preview?: File;
    fullSize?: File;
}

export type Details = {
    id: number;
    userId?:number;
    title?: string;
    description?: string;
    document?: ExpertDocument;
};

export type Certificate = {
    id: number;
    userId?: number;
    associationLevelId?: number;
    document?: ExpertDocument;
};

export type Practice = {
    id: number;
    userId?: number;
    description?: string;
    themesGroupIds?: number[];
};

export type ThemeGroup = {
    id: number;
    name: string;
    isActive?: boolean;
    canDeleted?: boolean;
};

export type Association = {
    id: number;
    name: string;
};

export type AssociationLevel = {
    id: number;
    associationId: number;
    name: string;
};

export interface ExpertItem {
    id: number;
    name: string;
    surname?: string;
    faceImageUrl?: string;
    sessionDuration: number;
    sessionCost: number;
    coachRating?: number;
    tags: Tag[];
    speciality?: string;
    specialityDesc?: string;
    description?: string;
    coachLanguages?: string[]
}

export type ExpertsData = {
    coaches: ExpertItem[];
    themesGroups?: ThemeGroups[],
    sessionCostMin?: number;
    sessionCostMax?: number;
    sessionDurationMin?: number;
    sessionDurationMax?: number;
    total: number;
};

export type ExpertDetails = {
    publicCoachDetails: ExpertItem & {
        practiceHours?: number;
        supervisionPerYearId?: number;
        educations?: Details[];
        certificates?: Certificate[];
        trainings?: Details[];
        mbas?: Details[];
        experiences?: Details[];
        practiceCases?: Practice[];
        themesGroups?: ThemeGroup[];
    };
    associations?: Association[];
    associationLevels?: AssociationLevel[];
};
