import a from "classnames";
import o from "react";
import { I as _ } from "./InputLabel-760cfc94.mjs";
import { ChevronDown as i } from "react-feather";
import f, { components as s } from "react-select";
const u = "vertical _vertical_280e3", d = "formGroup _formGroup_282a9", p = "horizontal _horizontal_40aa9", G = "formGroupLabel _formGroupLabel_12e01", E = "formGroupError _formGroupError_a0baf", v = "formGroupInfo _formGroupInfo_4cdf6", h = "formGroupMarginBottom _formGroupMarginBottom_4a78a", t = {
  vertical: u,
  formGroup: d,
  horizontal: p,
  formGroupLabel: G,
  formGroupError: E,
  formGroupInfo: v,
  formGroupMarginBottom: h
}, z = {
  pseudoMarginBottom: t.formGroupMarginBottom
}, D = ({ className: r, children: e, orientation: c = "vertical", ...n }) => /* @__PURE__ */ o.createElement("form", { className: a(t[c], r), ...n }, e), I = (r) => /* @__PURE__ */ o.createElement("div", { className: a("formGroup", t.formGroup, r.className, r.hasError ? "hasError" : void 0) }, r.children), N = (r) => r.children ? /* @__PURE__ */ o.createElement("span", { className: a("formGroupError", t.formGroupError, r.className) }, r.children) : null, y = (r) => r.children ? /* @__PURE__ */ o.createElement("span", { className: a("formGroupInfo", t.formGroupInfo, r.className) }, r.children) : null, C = "selectContainer _selectContainer_63e5a", b = "error _error_30941", B = "fullWidth _fullWidth_7f1ba", m = {
  selectContainer: C,
  error: b,
  fullWidth: B
}, g = (r) => /* @__PURE__ */ o.createElement(s.DropdownIndicator, { ...r }, /* @__PURE__ */ o.createElement(i, { className: "icon" })), F = ({ dataQaProps: r, ...e }) => /* @__PURE__ */ o.createElement("div", { "data-qa-props": r }, /* @__PURE__ */ o.createElement(s.Option, { ...e }));
function O({ label: r, errorMessage: e, dataQa: c, isFullWidth: n, ...l }) {
  return /* @__PURE__ */ o.createElement(
    I,
    {
      className: a(m.selectContainer, { [m.error]: !!e, [m.fullWidth]: n }),
      "data-qa-id": c
    },
    r && /* @__PURE__ */ o.createElement(_, null, r),
    /* @__PURE__ */ o.createElement(
      f,
      {
        ...l,
        components: { DropdownIndicator: g, Option: F },
        className: a("react-select-container", { [m.fullWidth]: n }),
        classNamePrefix: "react-select"
      }
    ),
    /* @__PURE__ */ o.createElement(N, null, e)
  );
}
export {
  N as F,
  O as S,
  I as a,
  y as b,
  z as c,
  D as d
};
