import react, { useContext, useEffect, useState } from "react";
const ValidationStatusContext = /*#__PURE__*/ react.createContext({
    getElementValidationState: ()=>void 0
});
const useElementValidationStatus = (elementId)=>{
    const context = useContext(ValidationStatusContext);
    const [validationState, setValidationState] = useState();
    useEffect(()=>{
        const state = context.getElementValidationState(elementId);
        setValidationState(state);
    }, [
        elementId,
        context
    ]);
    return validationState;
};
export { ValidationStatusContext, useElementValidationStatus };
