import { useQuery } from "@tanstack/react-query";
import * as api from "../service/Service";
import { BrandProductsParams } from "../types/Types";

export const useGetBrandProducts = (params: BrandProductsParams) => {
  return useQuery({
    queryKey: ["brand-products", params],
    queryFn: () => api.getBrandProducts(params),
    enabled: !!params.brandId,
  });
};
