import { LinguiContext } from "@lingui/react";
import { useContext, useMemo } from "react";
const fallbackTranslate = (arg)=>'string' == typeof arg ? arg : arg.message ?? arg.id;
function useSafeLingui() {
    const ctx = useContext(LinguiContext);
    return useMemo(()=>({
            _: ctx?._ ?? fallbackTranslate
        }), [
        ctx
    ]);
}
export { useSafeLingui };
