import { a6 as e, F as d, eY as c, eZ as t, bV as n, f4 as p, f5 as x, f6 as f, f7 as y } from "./603b75d9.js";
import "react";
import "react-dom";
const g = (l) => {
  const {
    items: o,
    canAdd: s,
    onAddClick: a,
    title: r
  } = l;
  return /* @__PURE__ */ e("fieldset", {
    children: [r && /* @__PURE__ */ d("legend", {
      children: r
    }), /* @__PURE__ */ e(c, {
      gutter: [0, 0],
      children: [o.map((i) => /* @__PURE__ */ e(t, {
        span: 24,
        style: {
          display: "flex",
          alignItems: "center"
        },
        children: [/* @__PURE__ */ d("div", {
          style: {
            flexGrow: 1
          },
          children: i.children
        }), /* @__PURE__ */ e("div", {
          style: {
            display: "flex",
            flexDirection: "row",
            justifyContent: "flex-end",
            paddingTop: "58px"
          },
          children: [i.hasMoveDown && /* @__PURE__ */ d(n, {
            type: "default",
            icon: /* @__PURE__ */ d(p, {}),
            onClick: i.onReorderClick(i.index, i.index + 1),
            style: {
              marginLeft: "4px"
            }
          }), i.hasMoveUp && /* @__PURE__ */ d(n, {
            type: "default",
            icon: /* @__PURE__ */ d(x, {}),
            onClick: i.onReorderClick(i.index, i.index - 1),
            style: {
              marginLeft: "4px"
            }
          }), i.hasRemove && /* @__PURE__ */ d(n, {
            type: "default",
            icon: /* @__PURE__ */ d(f, {}),
            danger: !0,
            onClick: i.onDropIndexClick(i.index),
            style: {
              marginLeft: "4px"
            }
          })]
        })]
      }, i.index)), s && /* @__PURE__ */ d(t, {
        span: 24,
        style: {
          textAlign: "center"
        },
        children: /* @__PURE__ */ d(n, {
          type: "dashed",
          onClick: a,
          icon: /* @__PURE__ */ d(y, {}),
          children: "Add Item"
        })
      })]
    })]
  });
};
export {
  g as default
};
