import { useQuery } from "@tanstack/react-query";
import { getLeadNavigationTabs } from "../services/getLayoutAPI";

export const useGetNavigationLayoutAPI = (
  entity_type: string,
  type: string
) => {
  const getNavigationLayoutQuery = useQuery({
    queryKey: ["GET_NAVIGATION_LAYOUT", entity_type, type],
    queryFn: () => getLeadNavigationTabs(entity_type, type),
    enabled: !!entity_type,
  });

  return getNavigationLayoutQuery;
};
