import * as c from "react";
import i from "./context.mjs";
import n from "./en_US.mjs";
const d = (t, s) => {
  const o = c.useContext(i), a = c.useMemo(() => {
    var e;
    const l = s || n[t], u = (e = o == null ? void 0 : o[t]) !== null && e !== void 0 ? e : {};
    return Object.assign(Object.assign({}, typeof l == "function" ? l() : l), u || {});
  }, [t, s, o]), r = c.useMemo(() => {
    const e = o == null ? void 0 : o.locale;
    return o != null && o.exist && !e ? n.locale : e;
  }, [o]);
  return [a, r];
}, L = d;
export {
  L as default
};
