import routes from "@/routes";
import { getBaseHeaders } from "../utils";

interface IResponseGetSuccess {
    categories: ICategory[];
    day: IAssistant;
}

export interface ICategory {
    title: string;
    subtitle: string;
    icon: null | string;
    assistants: IAssistant[];
}

export enum EAssistantStatus {
    ONLINE = "online",
    BUSY = "busy"
}

export interface IAssistant {
    id: string;
    name: string;
    image: string;
    status: EAssistantStatus;
    rating: number;
    reviews: number;
    experience: number;
    readings: number;
    price: number;
    tags?: string[];
}

// interface IResponseGetError {
//     status: string;
//     message: string;
// }

export type ResponseGet = IResponseGetSuccess

export const getRequest = (): Request => {
    const url = new URL(routes.server.getChatsCategories());
    return new Request(url, { method: "GET", headers: getBaseHeaders() });
};
