// imports

import { useMutation } from "@tanstack/vue-query";
import { API_ENDPOINTS } from "~/constants";

const useDeleteSpecialDiscountCode = () => {
    // state

    const { $axios: axios } = useNuxtApp();

    // methods

    const handleDeleteSpecialDiscountCode = async () => {
        const { data } = await axios.delete(
            API_ENDPOINTS.orders.cart.delete_special_discount
        );
        return data;
    };

    return useMutation({
        mutationFn: () => handleDeleteSpecialDiscountCode(),
    });
};

export default useDeleteSpecialDiscountCode;
