"use client";
import { j as e } from "../../../node_modules/.pnpm/react@19.1.0/node_modules/react/jsx-runtime.mjs";
import c from "./LanguageSelector.module.scss.mjs";
import { locales as d, FLAG_POSITION as n, languageFlags as i, languageLabels as h } from "./constants.mjs";
function L({
  locales: g = d,
  flagPosition: l = n.PREPEND,
  i18n: r
}) {
  const u = r.language || "en", o = (a) => {
    r.changeLanguage(a);
  }, m = (a) => {
    const s = i[a], t = h[a];
    return /* @__PURE__ */ e.jsxs("option", { value: a, children: [
      l === n.PREPEND ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
        s,
        "    ",
        t
      ] }) : null,
      l === n.APPEND ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
        t,
        " ",
        s
      ] }) : null,
      l === n.NONE ? /* @__PURE__ */ e.jsx(e.Fragment, { children: t }) : null
    ] }, a);
  };
  return /* @__PURE__ */ e.jsx(e.Fragment, { children: /* @__PURE__ */ e.jsx("div", { className: c.selectContainer, children: /* @__PURE__ */ e.jsx(
    "select",
    {
      className: c.styledSelect,
      "data-testid": "selectLanguage",
      value: u,
      onChange: (a) => o(a.target.value),
      children: g.map(m)
    }
  ) }) });
}
export {
  n as FLAG_POSITION,
  L as LanguageSelector,
  i as languageFlags,
  h as languageLabels,
  d as locales
};
//# sourceMappingURL=index.mjs.map
