const BASE_URL_API = process.env.NEXT_PUBLIC_BASE_URL_API;

export async function getSiteInfo() {
    const res = await fetch(`${BASE_URL_API}website/info`, {
        cache: "no-cache",
    });
    const data = await res.json();
    return data?.websiteInfo || {};
}

export async function getServices() {
    const res = await fetch(`${BASE_URL_API}service/all-service`, {
        cache: "no-cache",
    });
    const data = await res.json();
    return data?.data || [];
}

export async function getProducts() {
    const res = await fetch(`${BASE_URL_API}product/all-product`, {
        cache: "no-cache",
    });
    const data = await res.json();
    return data?.data || [];
}

export async function getBanners() {
    const res = await fetch(`${BASE_URL_API}banner/all-banner`, {
        cache: "no-cache",
    });
    const data = await res.json();
    return data?.data || [];
}

export async function getGallery() {
    const res = await fetch(`${BASE_URL_API}gallery/all-gallery`, {
        cache: "no-cache",
    });
    const data = await res.json();
    return data?.data || [];
}

export async function getBrand() {
    const res = await fetch(`${BASE_URL_API}brand/all-brand`, {
        cache: "no-cache",
    });
    const data = await res.json();
    return data?.data || [];
}

export async function getTestimonial() {
    const res = await fetch(`${BASE_URL_API}testimonial/all-testimonial`, {
        cache: "no-cache",
    });
    const data = await res.json();
    return data?.data || [];
}

export async function getLocation() {
    const res = await fetch(`${BASE_URL_API}country-wise`, {
        cache: "no-cache",
    });
    const data = await res.json();
    return data?.data || [];
}


export async function getAllIndustry() {
    const res = await fetch(`${BASE_URL_API}nature-of-business/all-business-type`, {
        cache: "no-cache",
    });
    const data = await res.json();
    return data?.natureOfBusiness || [];
}



