"use client";
import { j as e } from "../../../../node_modules/.pnpm/react@19.1.0/node_modules/react/jsx-runtime.mjs";
import { Menu as f } from "@mantine/core";
import i from "../GenericDropdown/index.mjs";
import r from "./Dropdown.module.scss.mjs";
function I({
  options: o,
  selected: s,
  onItemChange: d,
  targetWidth: n,
  dropdownButtonDivProps: m,
  dropdownButtonDataTestId: x,
  dropdownButtonProps: c,
  ...a
}) {
  const p = o.map((t, l) => /* @__PURE__ */ e.jsx(
    f.Item,
    {
      onClick: () => d(t),
      "data-testid": t.dataTestId,
      children: /* @__PURE__ */ e.jsx(
        "div",
        {
          className: `${t.text === s.text || t.selected ? r.selected : ""}`,
          children: t.text
        }
      )
    },
    "filterIndex" + l
  ));
  return /* @__PURE__ */ e.jsx(
    i,
    {
      target: /* @__PURE__ */ e.jsx(
        i.GenericButton,
        {
          text: s.text,
          style: { width: n },
          divProps: m,
          "data-testid": x,
          ...c
        }
      ),
      classNames: { item: r.item },
      ...a,
      children: p
    }
  );
}
export {
  I as default
};
//# sourceMappingURL=index.mjs.map
