'use client';
import { useFormFields } from '../Form/context.js';
export const WatchCondition = (props)=>{
    const { children, path } = props;
    const field = useFormFields(([fields])=>fields && fields?.[path] || null);
    const { passesCondition } = field || {};
    if (passesCondition === false) {
        return null;
    }
    return children;
};

//# sourceMappingURL=WatchCondition.js.map