import ObjectList from "../../../hooks/objectList.tsx";
import { TransactionService } from "../../../client";

type Props = {
    isIncome: boolean;
}

const useTransactionTagsList = ({ isIncome }: Props) =>
    ObjectList({
        queryFn: () => TransactionService.getTransactionTags(
            { isIncome },
        ),
        getObjectsFn: response => response.tags,
        queryKey: "getTransactionTags",
    });
export default useTransactionTagsList;