import { FormGroup as i, FormGroupError as s } from "./accelbyte-widgets263.mjs";
import { InputLabel as u } from "./accelbyte-widgets435.mjs";
import a from "classnames";
import e from "react";
import { ChevronDown as d } from "react-feather";
import f, { components as m } from "react-select";
import o from "./accelbyte-widgets612.mjs";
const E = (t) => /* @__PURE__ */ e.createElement(m.DropdownIndicator, { ...t }, /* @__PURE__ */ e.createElement(d, { className: "icon" })), N = ({ dataQaProps: t, ...r }) => /* @__PURE__ */ e.createElement("div", { "data-qa-props": t }, /* @__PURE__ */ e.createElement(m.Option, { ...r }));
function q({ label: t, errorMessage: r, dataQa: c, isFullWidth: n, className: l, ...p }) {
  return /* @__PURE__ */ e.createElement(
    i,
    {
      className: a(l, o.selectContainer, { [o.error]: !!r, [o.fullWidth]: n }),
      "data-qa-id": c
    },
    t && /* @__PURE__ */ e.createElement(u, null, t),
    /* @__PURE__ */ e.createElement(
      f,
      {
        ...p,
        components: { DropdownIndicator: E, Option: N },
        className: a("react-select-container", { [o.fullWidth]: n }),
        classNamePrefix: "react-select"
      }
    ),
    /* @__PURE__ */ e.createElement(s, null, r)
  );
}
export {
  q as Select
};
