import { j as s } from "./jsx-runtime-OVHDjVDe.js";
import { au as v, c as N, G as A, s as o, av as C, aw as _, ax as w, ay as E, az as k, aA as z, aB as I, aC as L, aD as O, aE as T } from "./main-BINuQ9na.js";
import { X as V, C as n, p as X } from "./css-BYwooBtA.js";
import "./provider-CKYgKu3z.js";
import "react";
import "react-dom";
const q = (a) => /* @__PURE__ */ s.jsx(v, { ...a, inputType: "checkbox" }), u = ({
  className: a,
  variant: t,
  ...e
}) => /* @__PURE__ */ s.jsx(
  N,
  {
    className: n(n.B("input-help-text"), a),
    color: 8,
    status: V.removeVariants(t, "success"),
    level: "small",
    ...e
  }
), d = ({
  className: a,
  required: t = !1,
  children: e,
  ...r
}) => /* @__PURE__ */ s.jsxs("label", { className: n(n.B("input-label"), a), ...r, children: [
  e,
  " ",
  t && /* @__PURE__ */ s.jsx("span", { className: n.B("required-indicator"), children: "*" })
] }), F = (a, t = "y") => a ?? (X.construct(t) === "y" ? "stretch" : "center"), G = ({
  label: a,
  showLabel: t = !0,
  helpText: e,
  direction: r,
  x: g,
  y: f,
  className: y,
  children: l,
  required: h,
  align: b,
  gap: B = "small",
  padHelpText: m = !1,
  status: p,
  showHelpText: x = !0,
  ...D
}) => {
  const i = A(r, g, f, !1);
  let c;
  const S = x && e != null && e.length > 0, j = t && a != null && a.length > 0;
  return !S && !j ? /* @__PURE__ */ s.jsx(s.Fragment, { children: l }) : (i === "x" ? c = /* @__PURE__ */ s.jsxs(o, { y: !0, gap: "small", children: [
    l,
    x && (m || e != null && e.length > 0) && /* @__PURE__ */ s.jsx(u, { variant: p, children: e })
  ] }) : c = /* @__PURE__ */ s.jsxs(o, { y: !0, gap: 1 / 3, align: "stretch", children: [
    l,
    (m || e != null && e.length > 0) && /* @__PURE__ */ s.jsx(u, { variant: p, children: e })
  ] }), /* @__PURE__ */ s.jsxs(
    o,
    {
      className: n(n.BE("input", "item"), y),
      direction: i,
      gap: B,
      align: F(b, i),
      ...D,
      children: [
        j && /* @__PURE__ */ s.jsx(d, { required: h, children: a }),
        c
      ]
    }
  ));
}, K = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  Checkbox: q,
  Date: C,
  DateTime: _,
  DragButton: w,
  HelpText: u,
  Item: G,
  Label: d,
  Numeric: E,
  Switch: k,
  Text: z,
  Time: I,
  combineDateAndTimeValue: L,
  useDate: O,
  useTime: T
}, Symbol.toStringTag, { value: "Module" }));
export {
  G as I,
  K as e
};
