import wccRest from "@/helpers/api";

export default {
    async createmscm(data) {
        try {
            const response = await wccRest.post({
                path: `mscm/`,
                data: data,
            });
            return response;
        } catch (error) {
            console.error(error);
        }
    },
    async getConsents() {
        try {
            const response = await wccRest.get({
                path: `mscm/`,
            });
            return response;
        } catch (error) {
            console.error(error);
        }
    },
    async saveConsents(data) {
        try {
            const response = await wccRest.post({
                path: `mscm/defaultconsents`,
                data: { content: data },
            });
            return response;
        } catch (error) {
            console.error(error);
        }
    },
    async allRegions() {
        try {
            const response = await wccRest.get({
                path: `mscm/regions`,
            });
            return response;
        } catch (error) {
            console.error(error);
        }
    },
}