import {
    getData,
    postData,
    putData,
    editStatusData,
    deleteData,
    getDownloadDataExcel,
} from "../../api";


export const registerStore = async (data) => {
    try {
        const res = await postData(`/website/register-store`, data);
        return res;
    } catch (error) {
        console.log(error);
    }
};

export const getAllStore = async (data) => {
    try {
        const res = await getData(`/website/all-store?s_category_id=${data.s_category_id || ""}&` +
            `city_id=${data.city_id || ""}&p_category_id=${data.p_category_id || ""}&p_sub_category_id=${data.p_sub_category_id || ""}` +
            `service_id=${data.service_id || ""}`);
        return res;
    } catch (error) {
        console.log(error);
    }
};

export const getSingleStore = async (id) => {
    try {
        const res = await getData(`/website/store/${id}`);
        return res;
    } catch (error) {
        console.log(error);
    }
};