import { useEffect } from 'react';
import { truthyAndArrayPredicate } from '../util/const.js';
export function useConditionalEffect(callback, deps, conditions, predicate = truthyAndArrayPredicate, effectHook = useEffect, ...effectHookRestArgs) {
    effectHook((() => {
        if (predicate(conditions)) {
            return callback();
        }
    }), deps, ...effectHookRestArgs);
}
