import c from "classnames";
import t from "react";
import { F as h, c as u } from "./FormGroup-9051ef94.mjs";
import { I as x } from "./InputLabel-760cfc94.mjs";
import { ChevronDown as f } from "react-feather";
import y, { components as _ } from "react-select";
const g = "typography _typography_ae519", E = "label _label_45495", b = "heading _heading_43a4d", v = "centered _centered_4f8e5", n = {
  typography: g,
  label: E,
  heading: b,
  centered: v
}, C = {
  "3xl": "text-3xl",
  "2xl": "text-2xl",
  xl: "text-xl",
  lg: "text-lg",
  md: "text-md",
  base: "text-base",
  sm: "text-sm",
  "2sm": "text-2sm",
  xs: "text-xs"
};
function A({ tag: e, isCentered: a, fontSize: s = "base", className: r, children: l, dataQa: d }) {
  const i = e.startsWith("h"), m = e === "p", p = e === "label";
  return /* @__PURE__ */ t.createElement(
    e,
    {
      className: c(r, C[s], {
        [n.centered]: a,
        [n.heading]: i,
        [n.label]: p,
        [n.typography]: m || i
      }),
      "data-qa-id": d
    },
    l
  );
}
const N = "selectContainer _selectContainer_0de3e", S = "error _error_ed20e", W = "fullWidth _fullWidth_83cfc", o = {
  selectContainer: N,
  error: S,
  fullWidth: W
}, I = (e) => /* @__PURE__ */ t.createElement(_.DropdownIndicator, { ...e }, /* @__PURE__ */ t.createElement(f, { className: "icon" })), O = ({ dataQaProps: e, ...a }) => /* @__PURE__ */ t.createElement("div", { "data-qa-props": e }, /* @__PURE__ */ t.createElement(_.Option, { ...a }));
function F({ label: e, errorMessage: a, dataQa: s, isFullWidth: r, ...l }) {
  return /* @__PURE__ */ t.createElement(
    h,
    {
      className: c(o.selectContainer, { [o.error]: !!a, [o.fullWidth]: r }),
      "data-qa-id": s
    },
    e && /* @__PURE__ */ t.createElement(x, null, e),
    /* @__PURE__ */ t.createElement(
      y,
      {
        ...l,
        components: { DropdownIndicator: I, Option: O },
        className: c("react-select-container", { [o.fullWidth]: r }),
        classNamePrefix: "react-select"
      }
    ),
    /* @__PURE__ */ t.createElement(u, null, a)
  );
}
export {
  F as S,
  A as T
};
