import { jsxs as a, jsx as e, Fragment as P } from "react/jsx-runtime";
import i from "../../utils/classNames.js";
import F from "../clearableInput/ClearableInput.js";
const D = (o) => {
  const {
    id: p,
    triggerRef: t,
    inputRef: c,
    displayValue: d,
    iconName: m,
    isSingleMode: n,
    isClearable: u,
    inputMaskProps: g,
    mergedInputProps: h,
    inputClassName: f,
    errorMessage: r,
    warningMessage: s,
    messageWhiteSpace: k,
    onChange: y,
    onAddonClick: C,
    onClick: N,
    onFocus: b,
    onBlur: w,
    onKeyDown: v,
    onClear: x
  } = o, l = !!(r || s);
  return /* @__PURE__ */ a("div", { children: [
    /* @__PURE__ */ a("div", { ref: t, className: "input-group", children: [
      /* @__PURE__ */ e("span", { className: "input-group-addon", onClick: C, children: /* @__PURE__ */ e("span", { className: i("rioglyph", m), "aria-hidden": "true" }) }),
      /* @__PURE__ */ a("div", { className: "form-control-feedback-wrapper flex-1-1", children: [
        /* @__PURE__ */ e(
          F,
          {
            ...h,
            id: p,
            ref: c,
            type: "text",
            value: d,
            ...n ? g : void 0,
            maskVisibility: "never",
            maskOverwrite: "shift",
            readOnly: !n,
            showClearButton: u,
            onChange: y,
            onClick: N,
            onFocus: b,
            onBlur: w,
            onKeyPress: (M) => v(M),
            onClear: () => x(),
            inputClassName: i("bg-white", !n && "cursor-pointer", f)
          }
        ),
        l ? /* @__PURE__ */ a(P, { children: [
          r ? /* @__PURE__ */ e("span", { className: "form-control-feedback rioglyph rioglyph-error-sign" }) : null,
          !r && s ? /* @__PURE__ */ e("span", { className: "form-control-feedback rioglyph rioglyph-warning-sign" }) : null
        ] }) : null
      ] })
    ] }),
    l ? /* @__PURE__ */ e("span", { className: `help-block white-space-${k}`, children: /* @__PURE__ */ e("span", { children: r || s }) }) : null
  ] });
};
export {
  D as default
};
//# sourceMappingURL=DayPickerInput.js.map
