import { useCallback as n, useMemo as c } from "../external/.pnpm/preact@10.28.2/node_modules/preact/hooks/dist/hooks.module.js";
import s from "../core/Context/preact/useCoreContext.js";
const m = (o) => {
  const { i18n: e } = s();
  return n(
    (...t) => {
      const r = e.timezone;
      try {
        return o(...t);
      } finally {
        e.timezone = r;
      }
    },
    [e, o]
  );
}, u = (o) => {
  const { i18n: e } = s(), t = m(
    n(() => (e.timezone = void 0, e.timezone = o, e.timezone), [e, o])
  );
  return c(t, [t]);
}, T = (o) => {
  const { i18n: e } = s(), t = u(o), r = m(
    n(
      (...i) => (e.timezone = t, e.date(...i)),
      [e, t]
    )
  ), a = m(
    n(
      (...i) => (e.timezone = t, e.fullDate(...i)),
      [e, t]
    )
  );
  return { dateFormat: r, fullDateFormat: a };
};
export {
  T as default
};
