import { jsx as g, jsxs as M } from "react/jsx-runtime";
import Q, { useRef as te, useState as Se, useEffect as de, useMemo as ke, useLayoutEffect as Me } from "react";
import { cn as w } from "./utils/functions.js";
import { RenderEach as Le } from "./utils/components/RenderEach.js";
import { RenderIf as P } from "./utils/components/RenderIf.js";
import he from "./components/Icons.js";
import { InputVariants as ue } from "./components/Inputs/variants.js";
import { m as Ke } from "./motion-dVICNqWI.js";
function be(e, a) {
  var t = {};
  for (var n in e)
    Object.prototype.hasOwnProperty.call(e, n) && a.indexOf(n) < 0 && (t[n] = e[n]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function")
    for (var r = 0, n = Object.getOwnPropertySymbols(e); r < n.length; r++)
      a.indexOf(n[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[r]) && (t[n[r]] = e[n[r]]);
  return t;
}
var ne;
(function(e) {
  e.event = "event", e.props = "prop";
})(ne || (ne = {}));
function Z() {
}
function $e(e) {
  var a, t = void 0;
  return function() {
    for (var n = [], r = arguments.length; r--; )
      n[r] = arguments[r];
    return a && n.length === a.length && n.every(function(i, l) {
      return i === a[l];
    }) || (a = n, t = e.apply(void 0, n)), t;
  };
}
function ie(e) {
  return !!(e || "").match(/\d/);
}
function Y(e) {
  return e == null;
}
function Ue(e) {
  return typeof e == "number" && isNaN(e);
}
function ye(e) {
  return Y(e) || Ue(e) || typeof e == "number" && !isFinite(e);
}
function we(e) {
  return e.replace(/[-[\]/{}()*+?.\\^$|]/g, "\\$&");
}
function We(e) {
  switch (e) {
    case "lakh":
      return /(\d+?)(?=(\d\d)+(\d)(?!\d))(\.\d+)?/g;
    case "wan":
      return /(\d)(?=(\d{4})+(?!\d))/g;
    case "thousand":
    default:
      return /(\d)(?=(\d{3})+(?!\d))/g;
  }
}
function ze(e, a, t) {
  var n = We(t), r = e.search(/[1-9]/);
  return r = r === -1 ? e.length : r, e.substring(0, r) + e.substring(r, e.length).replace(n, "$1" + a);
}
function Ge(e) {
  var a = te(e);
  a.current = e;
  var t = te(function() {
    for (var n = [], r = arguments.length; r--; )
      n[r] = arguments[r];
    return a.current.apply(a, n);
  });
  return t.current;
}
function me(e, a) {
  a === void 0 && (a = !0);
  var t = e[0] === "-", n = t && a;
  e = e.replace("-", "");
  var r = e.split("."), i = r[0], l = r[1] || "";
  return {
    beforeDecimal: i,
    afterDecimal: l,
    hasNegation: t,
    addNegation: n
  };
}
function Ze(e) {
  if (!e)
    return e;
  var a = e[0] === "-";
  a && (e = e.substring(1, e.length));
  var t = e.split("."), n = t[0].replace(/^0+/, "") || "0", r = t[1] || "";
  return (a ? "-" : "") + n + (r ? "." + r : "");
}
function Ve(e, a, t) {
  for (var n = "", r = t ? "0" : "", i = 0; i <= a - 1; i++)
    n += e[i] || r;
  return n;
}
function _e(e, a) {
  return Array(a + 1).join(e);
}
function Ie(e) {
  var a = e + "", t = a[0] === "-" ? "-" : "";
  t && (a = a.substring(1));
  var n = a.split(/[eE]/g), r = n[0], i = n[1];
  if (i = Number(i), !i)
    return t + r;
  r = r.replace(".", "");
  var l = 1 + i, v = r.length;
  return l < 0 ? r = "0." + _e("0", Math.abs(l)) + r : l >= v ? r = r + _e("0", l - v) : r = (r.substring(0, l) || "0") + "." + r.substring(l), t + r;
}
function xe(e, a, t) {
  if (["", "-"].indexOf(e) !== -1)
    return e;
  var n = (e.indexOf(".") !== -1 || t) && a, r = me(e), i = r.beforeDecimal, l = r.afterDecimal, v = r.hasNegation, N = parseFloat("0." + (l || "0")), S = l.length <= a ? "0." + l : N.toFixed(a), x = S.split("."), h = i.split("").reverse().reduce(function(V, I, m) {
    return V.length > m ? (Number(V[0]) + Number(I)).toString() + V.substring(1, V.length) : I + V;
  }, x[0]), _ = Ve(x[1] || "", a, t), p = v ? "-" : "", d = n ? "." : "";
  return "" + p + h + d + _;
}
function X(e, a) {
  if (e.value = e.value, e !== null) {
    if (e.createTextRange) {
      var t = e.createTextRange();
      return t.move("character", a), t.select(), !0;
    }
    return e.selectionStart || e.selectionStart === 0 ? (e.focus(), e.setSelectionRange(a, a), !0) : (e.focus(), !1);
  }
}
var Ce = $e(function(e, a) {
  for (var t = 0, n = 0, r = e.length, i = a.length; e[t] === a[t] && t < r; )
    t++;
  for (; e[r - 1 - n] === a[i - 1 - n] && i - n > t && r - n > t; )
    n++;
  return {
    from: { start: t, end: r - n },
    to: { start: t, end: i - n }
  };
});
function He(e, a, t) {
  return Math.min(Math.max(e, a), t);
}
function ve(e) {
  return Math.max(e.selectionStart, e.selectionEnd);
}
function Xe() {
  return typeof navigator < "u" && !(navigator.platform && /iPhone|iPod/.test(navigator.platform));
}
function qe(e) {
  return {
    from: {
      start: 0,
      end: 0
    },
    to: {
      start: 0,
      end: e.length
    },
    lastValue: ""
  };
}
function Je(e) {
  var a = e.currentValue, t = e.formattedValue, n = e.currentValueIndex, r = e.formattedValueIndex;
  return a[n] === t[r];
}
function Qe(e, a, t, n, r, i, l) {
  l === void 0 && (l = Je);
  var v = r.findIndex(function(U) {
    return U;
  }), N = e.slice(0, v);
  !a && !t.startsWith(N) && (a = N, t = N + t, n = n + N.length);
  for (var S = t.length, x = e.length, h = {}, _ = new Array(S), p = 0; p < S; p++) {
    _[p] = -1;
    for (var d = 0, V = x; d < V; d++) {
      var I = l({
        currentValue: t,
        lastValue: a,
        formattedValue: e,
        currentValueIndex: p,
        formattedValueIndex: d
      });
      if (I && h[d] !== !0) {
        _[p] = d, h[d] = !0;
        break;
      }
    }
  }
  for (var m = n; m < S && (_[m] === -1 || !i(t[m])); )
    m++;
  var F = m === S || _[m] === -1 ? x : _[m];
  for (m = n - 1; m > 0 && _[m] === -1; )
    m--;
  var k = m === -1 || _[m] === -1 ? 0 : _[m] + 1;
  return k > F ? F : n - k < F - n ? k : F;
}
function pe(e, a, t, n) {
  var r = e.length;
  if (a = He(a, 0, r), n === "left") {
    for (; a >= 0 && !t[a]; )
      a--;
    a === -1 && (a = t.indexOf(!0));
  } else {
    for (; a <= r && !t[a]; )
      a++;
    a > r && (a = t.lastIndexOf(!0));
  }
  return a === -1 && (a = r), a;
}
function Ye(e) {
  for (var a = Array.from({ length: e.length + 1 }).map(function() {
    return !0;
  }), t = 0, n = a.length; t < n; t++)
    a[t] = !!(ie(e[t]) || ie(e[t - 1]));
  return a;
}
function De(e, a, t, n, r, i) {
  i === void 0 && (i = Z);
  var l = Ge(function(d, V) {
    var I, m;
    return ye(d) ? (m = "", I = "") : typeof d == "number" || V ? (m = typeof d == "number" ? Ie(d) : d, I = n(m)) : (m = r(d, void 0), I = n(m)), { formattedValue: I, numAsString: m };
  }), v = Se(function() {
    return l(Y(e) ? a : e, t);
  }), N = v[0], S = v[1], x = function(d, V) {
    d.formattedValue !== N.formattedValue && S({
      formattedValue: d.formattedValue,
      numAsString: d.value
    }), i(d, V);
  }, h = e, _ = t;
  Y(e) && (h = N.numAsString, _ = !0);
  var p = l(h, _);
  return ke(function() {
    S(p);
  }, [p.formattedValue]), [N, x];
}
function Pe(e) {
  return e.replace(/[^0-9]/g, "");
}
function ea(e) {
  return e;
}
function aa(e) {
  var a = e.type;
  a === void 0 && (a = "text");
  var t = e.displayType;
  t === void 0 && (t = "input");
  var n = e.customInput, r = e.renderText, i = e.getInputRef, l = e.format;
  l === void 0 && (l = ea);
  var v = e.removeFormatting;
  v === void 0 && (v = Pe);
  var N = e.defaultValue, S = e.valueIsNumericString, x = e.onValueChange, h = e.isAllowed, _ = e.onChange;
  _ === void 0 && (_ = Z);
  var p = e.onKeyDown;
  p === void 0 && (p = Z);
  var d = e.onMouseUp;
  d === void 0 && (d = Z);
  var V = e.onFocus;
  V === void 0 && (V = Z);
  var I = e.onBlur;
  I === void 0 && (I = Z);
  var m = e.value, F = e.getCaretBoundary;
  F === void 0 && (F = Ye);
  var k = e.isValidInputCharacter;
  k === void 0 && (k = ie);
  var U = e.isCharacterSame, L = be(e, ["type", "displayType", "customInput", "renderText", "getInputRef", "format", "removeFormatting", "defaultValue", "valueIsNumericString", "onValueChange", "isAllowed", "onChange", "onKeyDown", "onMouseUp", "onFocus", "onBlur", "value", "getCaretBoundary", "isValidInputCharacter", "isCharacterSame"]), H = De(m, N, !!S, l, v, x), W = H[0], b = W.formattedValue, K = W.numAsString, z = H[1], $ = te({ formattedValue: b, numAsString: K }), J = function(o, u) {
    $.current = { formattedValue: o.formattedValue, numAsString: o.value }, z(o, u);
  }, G = Se(!1), ee = G[0], ae = G[1], f = te(null), c = te({
    setCaretTimeout: null,
    focusTimeout: null
  });
  de(function() {
    return ae(!0), function() {
      clearTimeout(c.current.setCaretTimeout), clearTimeout(c.current.focusTimeout);
    };
  }, []);
  var O = l, C = function(o, u) {
    var s = parseFloat(u);
    return {
      formattedValue: o,
      value: u,
      floatValue: isNaN(s) ? void 0 : s
    };
  }, D = function(o, u, s) {
    o.selectionStart === 0 && o.selectionEnd === o.value.length || (X(o, u), c.current.setCaretTimeout = setTimeout(function() {
      o.value === s && o.selectionStart !== o.selectionEnd && X(o, u);
    }, 0));
  }, R = function(o, u, s) {
    return pe(o, u, F(o), s);
  }, j = function(o, u, s) {
    var B = F(u), A = Qe(u, b, o, s, B, k, U);
    return A = pe(u, A, B), A;
  }, oe = function(o) {
    var u = o.formattedValue;
    u === void 0 && (u = "");
    var s = o.input, B = o.setCaretPosition;
    B === void 0 && (B = !0);
    var A = o.source, y = o.event, T = o.numAsString, E = o.caretPos;
    if (s) {
      if (E === void 0 && B) {
        var re = o.inputValue || s.value, se = ve(s);
        s.value = u, E = j(re, u, se);
      }
      s.value = u, B && E !== void 0 && D(s, E, u);
    }
    u !== b && J(C(u, T), { event: y, source: A });
  };
  de(function() {
    var o = $.current, u = o.formattedValue, s = o.numAsString;
    b !== u && (b !== K || u !== s) && J(C(b, K), {
      event: void 0,
      source: ne.props
    });
  }, [b, K]);
  var ce = f.current ? ve(f.current) : void 0, le = typeof window < "u" ? Me : de;
  le(function() {
    var o = f.current;
    if (b !== $.current.formattedValue && o) {
      var u = j($.current.formattedValue, b, ce);
      o.value = b, D(o, u, b);
    }
  }, [b]);
  var Be = function(o, u, s) {
    var B = Ce(b, o), A = Object.assign(Object.assign({}, B), { lastValue: b }), y = v(o, A), T = O(y);
    if (y = v(T, void 0), h && !h(C(T, y))) {
      var E = u.target, re = ve(E), se = j(o, b, re);
      return E.value = b, D(E, se, b), !1;
    }
    return oe({
      formattedValue: T,
      numAsString: y,
      inputValue: o,
      event: u,
      source: s,
      setCaretPosition: !0,
      input: u.target
    }), !0;
  }, Ae = function(o) {
    var u = o.target, s = u.value, B = Be(s, o, ne.event);
    B && _(o);
  }, Re = function(o) {
    var u = o.target, s = o.key, B = u.selectionStart, A = u.selectionEnd, y = u.value;
    y === void 0 && (y = "");
    var T;
    if (s === "ArrowLeft" || s === "Backspace" ? T = Math.max(B - 1, 0) : s === "ArrowRight" ? T = Math.min(B + 1, y.length) : s === "Delete" && (T = B), T === void 0 || B !== A) {
      p(o);
      return;
    }
    var E = T;
    if (s === "ArrowLeft" || s === "ArrowRight") {
      var re = s === "ArrowLeft" ? "left" : "right";
      E = R(y, T, re), E !== T && o.preventDefault();
    } else
      s === "Delete" && !k(y[T]) ? E = R(y, T, "right") : s === "Backspace" && !k(y[T]) && (E = R(y, T, "left"));
    E !== T && D(u, E, y), o.isUnitTestRun && D(u, E, y), p(o);
  }, Te = function(o) {
    var u = o.target, s = u.selectionStart, B = u.selectionEnd, A = u.value;
    if (A === void 0 && (A = ""), s === B) {
      var y = R(A, s);
      y !== s && D(u, y, A);
    }
    d(o);
  }, Oe = function(o) {
    o.persist && o.persist();
    var u = o.target;
    f.current = u, c.current.focusTimeout = setTimeout(function() {
      var s = u.selectionStart, B = u.selectionEnd, A = u.value;
      A === void 0 && (A = "");
      var y = R(A, s);
      y !== s && !(s === 0 && B === A.length) && D(u, y, A), V(o);
    }, 0);
  }, Ee = function(o) {
    f.current = null, clearTimeout(c.current.focusTimeout), clearTimeout(c.current.setCaretTimeout), I(o);
  }, Fe = ee && Xe() ? "numeric" : void 0, ge = Object.assign({ inputMode: Fe }, L, {
    type: a,
    value: b,
    onChange: Ae,
    onKeyDown: Re,
    onMouseUp: Te,
    onFocus: Oe,
    onBlur: Ee
  });
  if (t === "text")
    return r ? Q.createElement(Q.Fragment, null, r(b, L) || null) : Q.createElement("span", Object.assign({}, L, { ref: i }), b);
  if (n) {
    var je = n;
    return Q.createElement(je, Object.assign({}, ge, { ref: i }));
  }
  return Q.createElement("input", Object.assign({}, ge, { ref: i }));
}
function Ne(e, a) {
  var t = a.decimalScale, n = a.fixedDecimalScale, r = a.prefix;
  r === void 0 && (r = "");
  var i = a.suffix;
  i === void 0 && (i = "");
  var l = a.allowNegative, v = a.thousandsGroupStyle;
  if (v === void 0 && (v = "thousand"), e === "" || e === "-")
    return e;
  var N = fe(a), S = N.thousandSeparator, x = N.decimalSeparator, h = t !== 0 && e.indexOf(".") !== -1 || t && n, _ = me(e, l), p = _.beforeDecimal, d = _.afterDecimal, V = _.addNegation;
  return t !== void 0 && (d = Ve(d, t, !!n)), S && (p = ze(p, S, v)), r && (p = r + p), i && (d = d + i), V && (p = "-" + p), e = p + (h && x || "") + d, e;
}
function fe(e) {
  var a = e.decimalSeparator;
  a === void 0 && (a = ".");
  var t = e.thousandSeparator, n = e.allowedDecimalSeparators;
  return t === !0 && (t = ","), n || (n = [a, "."]), {
    decimalSeparator: a,
    thousandSeparator: t,
    allowedDecimalSeparators: n
  };
}
function ra(e, a) {
  e === void 0 && (e = "");
  var t = new RegExp("(-)"), n = new RegExp("(-)(.)*(-)"), r = t.test(e), i = n.test(e);
  return e = e.replace(/-/g, ""), r && !i && a && (e = "-" + e), e;
}
function ta(e, a) {
  return new RegExp("(^-)|[0-9]|" + we(e), a ? "g" : void 0);
}
function na(e, a, t) {
  return e === "" ? !0 : !(a != null && a.match(/\d/)) && !(t != null && t.match(/\d/)) && typeof e == "string" && !isNaN(Number(e));
}
function ia(e, a, t) {
  var n;
  a === void 0 && (a = qe(e));
  var r = t.allowNegative, i = t.prefix;
  i === void 0 && (i = "");
  var l = t.suffix;
  l === void 0 && (l = "");
  var v = t.decimalScale, N = a.from, S = a.to, x = S.start, h = S.end, _ = fe(t), p = _.allowedDecimalSeparators, d = _.decimalSeparator, V = e[h] === d;
  if (ie(e) && (e === i || e === l) && a.lastValue === "")
    return e;
  if (h - x === 1 && p.indexOf(e[x]) !== -1) {
    var I = v === 0 ? "" : d;
    e = e.substring(0, x) + I + e.substring(x + 1, e.length);
  }
  var m = function(c, O, C) {
    var D = !1, R = !1;
    i.startsWith("-") ? D = !1 : c.startsWith("--") ? (D = !1, R = !0) : l.startsWith("-") && c.length === l.length ? D = !1 : c[0] === "-" && (D = !0);
    var j = D ? 1 : 0;
    return R && (j = 2), j && (c = c.substring(j), O -= j, C -= j), { value: c, start: O, end: C, hasNegation: D };
  }, F = m(e, x, h), k = F.hasNegation;
  n = F, e = n.value, x = n.start, h = n.end;
  var U = m(a.lastValue, N.start, N.end), L = U.start, H = U.end, W = U.value, b = e.substring(x, h);
  e.length && W.length && (L > W.length - l.length || H < i.length) && !(b && l.startsWith(b)) && (e = W);
  var K = 0;
  e.startsWith(i) ? K += i.length : x < i.length && (K = x), e = e.substring(K), h -= K;
  var z = e.length, $ = e.length - l.length;
  e.endsWith(l) ? z = $ : (h > $ || h > e.length - l.length) && (z = h), e = e.substring(0, z), e = ra(k ? "-" + e : e, r), e = (e.match(ta(d, !0)) || []).join("");
  var J = e.indexOf(d);
  e = e.replace(new RegExp(we(d), "g"), function(c, O) {
    return O === J ? "." : "";
  });
  var G = me(e, r), ee = G.beforeDecimal, ae = G.afterDecimal, f = G.addNegation;
  return S.end - S.start < N.end - N.start && ee === "" && V && !parseFloat(ae) && (e = f ? "-" : ""), e;
}
function oa(e, a) {
  var t = a.prefix;
  t === void 0 && (t = "");
  var n = a.suffix;
  n === void 0 && (n = "");
  var r = Array.from({ length: e.length + 1 }).map(function() {
    return !0;
  }), i = e[0] === "-";
  r.fill(!1, 0, t.length + (i ? 1 : 0));
  var l = e.length;
  return r.fill(!1, l - n.length + 1, l + 1), r;
}
function la(e) {
  var a = fe(e), t = a.thousandSeparator, n = a.decimalSeparator, r = e.prefix;
  r === void 0 && (r = "");
  var i = e.allowNegative;
  if (i === void 0 && (i = !0), t === n)
    throw new Error(`
        Decimal separator can't be same as thousand separator.
        thousandSeparator: ` + t + ` (thousandSeparator = {true} is same as thousandSeparator = ",")
        decimalSeparator: ` + n + ` (default value for decimalSeparator is .)
     `);
  return r.startsWith("-") && i && (console.error(`
      Prefix can't start with '-' when allowNegative is true.
      prefix: ` + r + `
      allowNegative: ` + i + `
    `), i = !1), Object.assign(Object.assign({}, e), { allowNegative: i });
}
function ua(e) {
  e = la(e), e.decimalSeparator, e.allowedDecimalSeparators, e.thousandsGroupStyle;
  var a = e.suffix, t = e.allowNegative, n = e.allowLeadingZeros, r = e.onKeyDown;
  r === void 0 && (r = Z);
  var i = e.onBlur;
  i === void 0 && (i = Z);
  var l = e.thousandSeparator, v = e.decimalScale, N = e.fixedDecimalScale, S = e.prefix;
  S === void 0 && (S = "");
  var x = e.defaultValue, h = e.value, _ = e.valueIsNumericString, p = e.onValueChange, d = be(e, ["decimalSeparator", "allowedDecimalSeparators", "thousandsGroupStyle", "suffix", "allowNegative", "allowLeadingZeros", "onKeyDown", "onBlur", "thousandSeparator", "decimalScale", "fixedDecimalScale", "prefix", "defaultValue", "value", "valueIsNumericString", "onValueChange"]), V = fe(e), I = V.decimalSeparator, m = V.allowedDecimalSeparators, F = function(f) {
    return Ne(f, e);
  }, k = function(f, c) {
    return ia(f, c, e);
  }, U = Y(h) ? x : h, L = _ ?? na(U, S, a);
  Y(h) ? Y(x) || (L = L || typeof x == "number") : L = L || typeof h == "number";
  var H = function(f) {
    return ye(f) ? f : (typeof f == "number" && (f = Ie(f)), L && typeof v == "number" ? xe(f, v, !!N) : f);
  }, W = De(H(h), H(x), !!L, F, k, p), b = W[0], K = b.numAsString, z = b.formattedValue, $ = W[1], J = function(f) {
    var c = f.target, O = f.key, C = c.selectionStart, D = c.selectionEnd, R = c.value;
    if (R === void 0 && (R = ""), C !== D) {
      r(f);
      return;
    }
    O === "Backspace" && R[0] === "-" && C === S.length + 1 && t && X(c, 1), v && N && (O === "Backspace" && R[C - 1] === I ? (X(c, C - 1), f.preventDefault()) : O === "Delete" && R[C] === I && f.preventDefault()), m != null && m.includes(O) && R[C] === I && X(c, C + 1);
    var j = l === !0 ? "," : l;
    O === "Backspace" && R[C - 1] === j && X(c, C - 1), O === "Delete" && R[C] === j && X(c, C + 1), r(f);
  }, G = function(f) {
    var c = K;
    if (c.match(/\d/g) || (c = ""), n || (c = Ze(c)), N && v && (c = xe(c, v, N)), c !== K) {
      var O = Ne(c, e);
      $({
        formattedValue: O,
        value: c,
        floatValue: parseFloat(c)
      }, {
        event: f,
        source: ne.event
      });
    }
    i(f);
  }, ee = function(f) {
    return f === I ? !0 : ie(f);
  }, ae = function(f) {
    var c = f.currentValue, O = f.lastValue, C = f.formattedValue, D = f.currentValueIndex, R = f.formattedValueIndex, j = c[D], oe = C[R], ce = Ce(O, c), le = ce.to;
    return D >= le.start && D < le.end && m && m.includes(j) && oe === I ? !0 : j === oe;
  };
  return Object.assign(Object.assign({}, d), {
    value: z,
    valueIsNumericString: !1,
    isValidInputCharacter: ee,
    isCharacterSame: ae,
    onValueChange: $,
    format: F,
    removeFormatting: k,
    getCaretBoundary: function(f) {
      return oa(f, e);
    },
    onKeyDown: J,
    onBlur: G
  });
}
function fa(e) {
  var a = ua(e);
  return Q.createElement(aa, Object.assign({}, a));
}
const q = ({ message: e }) => /* @__PURE__ */ g(P, { condition: !!e, children: /* @__PURE__ */ g("span", { className: "_font-secondary _text-red-700", children: e }) }), ca = ({
  label: e,
  placeholder: a,
  className: t,
  type: n = "text",
  inputProps: r,
  fieldError: i,
  labelClass: l,
  variant: v = "govco"
}) => /* @__PURE__ */ M("div", { className: w("_flex _flex-col", { "_rounded-md": v == "govco" }, t), "data-id": "input-wrapper", children: [
  /* @__PURE__ */ g("label", { className: w("_font-main _text-common _text-input", l), children: e }),
  /* @__PURE__ */ g(
    "input",
    {
      placeholder: a,
      type: n,
      ...r,
      className: w(ue({ variant: v }), "cs3__form__input _p-[8px] _border _border-zinc-400", r == null ? void 0 : r.className)
    }
  ),
  /* @__PURE__ */ g(q, { message: i })
] }), sa = ({
  label: e,
  placeholder: a,
  className: t,
  fieldError: n,
  labelClass: r,
  inputClass: i,
  variant: l = "govco",
  ...v
}) => /* @__PURE__ */ M("div", { className: w("_flex _flex-col", { "_rounded-md": l == "govco" }, t), "data-id": "input-wrapper", children: [
  /* @__PURE__ */ g("label", { className: w("_font-main _text-common _text-input", r), children: e }),
  /* @__PURE__ */ g(
    fa,
    {
      placeholder: a,
      decimalSeparator: ",",
      thousandSeparator: ".",
      prefix: "$",
      decimalScale: 3,
      ...v,
      className: w(ue({ variant: l }), "cs3__form__input _p-[8px] _border _border-zinc-400", i)
    }
  ),
  /* @__PURE__ */ g(q, { message: n })
] }), da = ({
  label: e,
  placeholder: a,
  className: t,
  inputProps: n,
  fieldError: r,
  labelClass: i,
  optionsEntries: l = ["id", "description"],
  selectOptions: v = [],
  disabled: N = !1,
  variant: S = "govco"
}) => /* @__PURE__ */ M("div", { className: w("_flex _flex-col", t), "data-id": "input-wrapper", children: [
  /* @__PURE__ */ g(P, { condition: !!e, children: /* @__PURE__ */ g("label", { className: w("_font-main _text-common _text-input", i), children: e }) }),
  /* @__PURE__ */ M(
    "select",
    {
      disabled: N,
      ...n,
      className: w(ue({ variant: S }), "cs3__form__input _p-[8px] _border _border-zinc-400", n == null ? void 0 : n.className),
      children: [
        /* @__PURE__ */ g(P, { condition: !!a, children: /* @__PURE__ */ g("option", { value: "", className: "_text-input/70", children: a }) }),
        /* @__PURE__ */ g(
          Le,
          {
            of: v,
            render: (x, h) => {
              const [_, p] = [x[l[0]], x[l[1]]];
              return /* @__PURE__ */ g("option", { value: _, children: p }, h);
            }
          }
        )
      ]
    }
  ),
  /* @__PURE__ */ g(q, { message: r })
] }), va = ({ label: e, inputProps: a }) => /* @__PURE__ */ M("label", { className: w("_inline-flex _gap-[5px] _items-center _cursor-pointer", a == null ? void 0 : a.className), children: [
  /* @__PURE__ */ g("input", { type: "radio", className: "cs3__form__radio__input", ...a }),
  /* @__PURE__ */ g("p", { className: "_font-main _text-common _text-input", children: e })
] }), ma = ({ className: e, fieldError: a, label: t, labelClass: n, value: r = !1, disabled: i = !1, onChange: l }) => /* @__PURE__ */ M("div", { className: w("_flex _flex-col", e), "data-id": "input-wrapper", children: [
  /* @__PURE__ */ M("div", { className: "_flex _gap-[5px] _items-center", children: [
    /* @__PURE__ */ g(
      "div",
      {
        className: w("_w-[36px] _h-[20px] _flex _items-center _justify-start _rounded-xl _p-[2px]", {
          "_justify-end _bg-terceary": r,
          "_border _border-terceary": !r,
          "_pointer-events-none": i,
          "_cursor-pointer": !i,
          "_bg-disabled _border _border-secondaryDisabled": !r && i,
          "_bg-secondaryDisabled": r && i
        }),
        onClick: l,
        children: /* @__PURE__ */ g(
          Ke.div,
          {
            layout: !0,
            transition: { type: "spring", stiffness: 700, damping: 30 },
            className: w("_w-[16px] _h-[16px] _rounded-full", {
              "_bg-white": r,
              "_bg-terceary": !r,
              "_bg-neutral-500": !r && i
            })
          }
        )
      }
    ),
    /* @__PURE__ */ g(P, { condition: !!t, children: /* @__PURE__ */ g("p", { className: w("_font-main _text-common _text-input", n), children: t }) })
  ] }),
  /* @__PURE__ */ g(q, { message: a })
] }), ga = ({ className: e, fieldError: a, label: t, labelClass: n, disabled: r, inputProps: i }) => /* @__PURE__ */ M("div", { className: w("_flex _flex-col"), "data-id": "input-wrapper", children: [
  /* @__PURE__ */ M("label", { className: w("_flex _gap-[5px] _items-center", { "_cursor-pointer": !r }), children: [
    /* @__PURE__ */ g(
      "input",
      {
        className: w("cs3__checkbox__input", e),
        ...i,
        type: "checkbox",
        disabled: r
      }
    ),
    /* @__PURE__ */ g("p", { className: w("_font-main _text-common _text-input", n), children: t })
  ] }),
  /* @__PURE__ */ g(q, { message: a })
] }), ha = ({ isSearching: e = !0, className: a, children: t, onCancel: n, ...r }) => /* @__PURE__ */ M(
  "div",
  {
    className: w(
      "_relative _inline-flex _items-center _border _border-zinc-400 _rounded-[25px] _px-[15px] _py-[8px] focus:_border-secondary",
      a
    ),
    children: [
      /* @__PURE__ */ g("input", { type: "search", ...r, className: w("cs3__form__input _text-maximun _h-auto _p-0 _flex-1") }),
      /* @__PURE__ */ g("div", { className: "_h-5 _w-[57px] _inline-flex _justify-end _gap-1 _items-center", children: /* @__PURE__ */ M(P, { condition: !!r.value, children: [
        /* @__PURE__ */ g(he.XIcon, { className: "_h-6 _w-6 _text-secondary _cursor-pointer", onClick: n }),
        /* @__PURE__ */ M(P, { condition: !!e, children: [
          /* @__PURE__ */ g("div", { className: "_h-8 _w-[1px] _bg-disabled" }),
          /* @__PURE__ */ g(he.LoadingIcon, { className: "_text-secondary _static _h-6 _w-6" })
        ] })
      ] }) }),
      t
    ]
  }
), _a = ({
  label: e,
  placeholder: a,
  className: t,
  inputProps: n,
  fieldError: r,
  labelClass: i,
  variant: l = "govco"
}) => /* @__PURE__ */ M("div", { className: w("_flex _flex-col", { "_rounded-md": l == "govco" }, t), "data-id": "input-wrapper", children: [
  /* @__PURE__ */ g("label", { className: w("_font-main _text-common _text-input", i), children: e }),
  /* @__PURE__ */ g(
    "textarea",
    {
      placeholder: a,
      ...n,
      className: w(ue({ variant: l }), "cs3__form__input _p-[8px] _border _border-zinc-400 _h-auto", n == null ? void 0 : n.className)
    }
  ),
  /* @__PURE__ */ g(q, { message: r })
] }), Ia = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  CheckBoxInput: ga,
  InputCs3: ca,
  InputError: q,
  InputMoneyCs3: sa,
  InputSearchCs3: ha,
  RadioInputCs3: va,
  SelectCs3: da,
  SwitchButtonCs3: ma,
  TextAreaCs3: _a
}, Symbol.toStringTag, { value: "Module" }));
export {
  ga as C,
  ca as I,
  va as R,
  da as S,
  _a as T,
  ma as a,
  sa as b,
  ha as c,
  q as d,
  Ia as i
};
