import { useState as a, useMemo as m } from "react";
import { e as s, t as p, z as u, i as _, p as L } from "../../th_TH-d627cd51.js";
const f = (e) => {
  const [o, c] = a(e), [t, i] = a({
    en_US: s,
    th_TH: p,
    zh_CN: u,
    it_IT: _,
    pt_PT: L
  }), n = (r) => {
    i((z) => ({
      ...z,
      ...r
    }));
  }, l = m(() => t[o] || s, [o, t]);
  return {
    locale: o,
    setLocale: c,
    localeMessages: l,
    addLocalization: n
  };
};
export {
  f as useLocalization
};
