import { jsxs as a, jsx as s } from "react/jsx-runtime";
import { Children as n } from "react";
var o = /* @__PURE__ */ ((t) => (t.Columns = "Columns", t.Spider = "Spider", t))(o || {});
const w = ({
  layout: t,
  spanLastItem: d,
  children: c,
  "data-test-id": r = "multi-input"
}) => {
  const l = n.toArray(c);
  return /* @__PURE__ */ a("div", { "data-test-id": r, className: "tw-flex tw-gap-2 tw-w-full tw-flex-col", children: [
    t === "Columns" && /* @__PURE__ */ s("div", { "data-test-id": `${r}-grid-columns`, className: "tw-grid tw-grid-cols-2 tw-gap-2", children: l.map((e, i) => /* @__PURE__ */ s(
      "div",
      {
        className: d && i === l.length - 1 ? "tw-col-span-2" : "",
        children: e
      },
      i
    )) }),
    t === "Spider" && /* @__PURE__ */ a("div", { "data-test-id": `${r}-grid-spider`, className: "tw-grid tw-grid-cols-4 tw-gap-2", children: [
      l[0] ? /* @__PURE__ */ s("div", { className: "tw-col-start-2 tw-col-span-2", children: l[0] }) : null,
      l[1] ? /* @__PURE__ */ s("div", { className: "tw-col-start-1 tw-col-span-2", children: l[1] }) : null,
      l[2] ? /* @__PURE__ */ s("div", { className: "tw-col-start-3 tw-col-span-2", children: l[2] }) : null,
      l[3] ? /* @__PURE__ */ s("div", { className: "tw-col-start-2 tw-col-span-2", children: l[3] }) : null
    ] })
  ] });
};
w.displayName = "FondueMultiInput";
export {
  w as MultiInput,
  o as MultiInputLayout
};
//# sourceMappingURL=MultiInput.es.js.map
