import { Tag, ThemeGroups } from './tags';
import { Association, AssociationLevel, EducationData } from './education';

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 Practice = {
    id: number;
    userId?: number;
    description?: string;
    themesGroupIds?: number[];
};

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


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 & EducationData & {
        practiceHours?: number;
        supervisionPerYearId?: number;
        practiceCases?: Practice[];
        themesGroups?: ThemeGroup[];
    };
    associations?: Association[];
    associationLevels?: AssociationLevel[];
};
