import axios from "@/network/axios";
import { useQuery } from "@tanstack/react-query"

const getSallaClientDetails = async (id: string) => {
    const response = await axios.get(`dashboard/salla/clients/${id}`);
    return response.data;
}

export const useGetSallaClientDetails = (id: string) => {
 return useQuery({
    queryKey: ['salla-client-details' , id],
    queryFn: () => getSallaClientDetails(id),
    enabled: !!id,
 })   
}