import { useQuery } from "@tanstack/react-query";
import { getModulesWithAttributesOptions } from "@/lib/client/@tanstack/react-query.gen";

const useModulesWithAttrsList = () => {
    const { data, refetch } = useQuery(getModulesWithAttributesOptions());

    return {
        modules: data?.items ?? [],
        refetch,
    };
};

export default useModulesWithAttrsList;
