import { apiClient } from '../lib/apiClient';
import { SearchData, Languages } from '../types/tags';

export const getTagList = async (locale: string) => {
    const response = await apiClient.post(
        '/home/searchdata',
        {},
        {
            headers: {
                'X-User-Language': locale
            }
        }
    );

    return response.data as SearchData || null;
};

export const getLanguages = async (locale: string) => {
    const response = await apiClient.get(
        '/home/languages',
        {
            headers: {
                'X-User-Language': locale
            }
        }
    );

    return response.data as Languages || null;
};
