import { CHAT_FUNCTION_CALL_TYPES, CHAT_GPT_FUNCTIONS_CALLS, CLAUDE_FUNCTIONS_CALLS } from "src/modules/chat-history/chat-history.constant";
import { ISubscription } from "src/modules/subscriptions/subscriptions.interface";

export function getFunctionCallsArray(function_call: any[], subscription: ISubscription, chatServiceType: string): any[] {
    if (!function_call || !Array.isArray(function_call) || function_call.length === 0) {
        return [];
    }

    return CHAT_GPT_FUNCTIONS_CALLS;

    // const model = chatServiceType;


    // if (model === 'chatgpt') {

    //     const functionsForGpt = [...(subscription?.enabledImageGeneration?.gpt ? [CHAT_GPT_FUNCTIONS_CALLS.find((func) => func.name === CHAT_FUNCTION_CALL_TYPES.GENERATE_IMAGE)] : []),
    //     ...(subscription?.enabledRealtimeSearch?.gpt ? [CHAT_GPT_FUNCTIONS_CALLS.find((func) => func.name === CHAT_FUNCTION_CALL_TYPES.GET_UPTO_DATE_DATA)] : []),
    //     ...(subscription?.enabledRealtimeSearch?.gpt ? [CHAT_GPT_FUNCTIONS_CALLS.find((func) => func.name === CHAT_FUNCTION_CALL_TYPES.GET_DATA_FROM_URL)] : [])];

    //     return functionsForGpt;
    // }

    // if (model === 'claude') {
    //     const functionsForGpt = [...(subscription?.enabledImageGeneration?.claude ? [CHAT_GPT_FUNCTIONS_CALLS.find((func) => func.name === CHAT_FUNCTION_CALL_TYPES.GENERATE_IMAGE)] : []),
    //     ...(subscription?.enabledRealtimeSearch?.claude ? [CHAT_GPT_FUNCTIONS_CALLS.find((func) => func.name === CHAT_FUNCTION_CALL_TYPES.GET_UPTO_DATE_DATA)] : []),
    //     ...(subscription?.enabledRealtimeSearch?.claude ? [CHAT_GPT_FUNCTIONS_CALLS.find((func) => func.name === CHAT_FUNCTION_CALL_TYPES.GET_DATA_FROM_URL)] : [])];

    //     return functionsForGpt;
    // }

    // if (model === 'gemini') {
    //     const functionsForGpt = [...(subscription?.enabledImageGeneration?.gemini ? [CHAT_GPT_FUNCTIONS_CALLS.find((func) => func.name === CHAT_FUNCTION_CALL_TYPES.GENERATE_IMAGE)] : []),
    //     ...(subscription?.enabledRealtimeSearch?.gemini ? [CHAT_GPT_FUNCTIONS_CALLS.find((func) => func.name === CHAT_FUNCTION_CALL_TYPES.GET_UPTO_DATE_DATA)] : []),
    //     ...(subscription?.enabledRealtimeSearch?.gemini ? [CHAT_GPT_FUNCTIONS_CALLS.find((func) => func.name === CHAT_FUNCTION_CALL_TYPES.GET_DATA_FROM_URL)] : [])];

    //     return functionsForGpt;
    // }

}