"use client";
import { j as r } from "./index.esm38.js";
import { forwardRef as N } from "react";
import p from "./index.esm40.js";
import a from "./index.esm44.js";
const v = N(
  ({
    size: i = "md",
    startIcon: s,
    endIcon: t,
    fullWidth: l = !1,
    error: e = !1,
    errorMessageId: n,
    disabled: d,
    placeholder: m,
    type: o = "text",
    "aria-label": c,
    "aria-invalid": u,
    "aria-required": f,
    "aria-describedby": x,
    className: b,
    id: j,
    ...h
  }, w) => {
    const y = [x, e && n].filter(Boolean).join(" ") || void 0;
    return /* @__PURE__ */ r.jsxs(
      "div",
      {
        "data-atme-ui": !0,
        className: p(
          a.wrapper,
          a[`wrapper--${i}`],
          l && a["wrapper--fullWidth"],
          e && a["wrapper--error"],
          d && a["wrapper--disabled"]
        ),
        children: [
          s && /* @__PURE__ */ r.jsx("span", { className: a.iconStart, "aria-hidden": "true", children: s }),
          /* @__PURE__ */ r.jsx(
            "input",
            {
              ref: w,
              id: j,
              type: o,
              className: p(a.input, b),
              placeholder: m,
              disabled: d,
              "aria-label": c,
              "aria-invalid": u ?? e,
              "aria-required": f,
              "aria-describedby": y,
              "data-size": i,
              ...h
            }
          ),
          t && /* @__PURE__ */ r.jsx("span", { className: a.iconEnd, "aria-hidden": "true", children: t })
        ]
      }
    );
  }
);
v.displayName = "Input";
export {
  v as Input
};
//# sourceMappingURL=index.esm14.js.map
