"use strict";
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
require("react");
const emotionReactJsxRuntime_browser_esm = require("../../../node_modules/.pnpm/@emotion_react@11.10.4_q4mq7tnhdumujvomvw24zx33y4/node_modules/@emotion/react/jsx-runtime/dist/emotion-react-jsx-runtime.browser.esm.js");
const index = require("../../../node_modules/.pnpm/@arco-design_web-react@2.40.1_biqbaboplfbrettd7655fr4n2y/node_modules/@arco-design/web-react/es/Form/index.js");
const index$1 = require("../../../node_modules/.pnpm/@arco-design_web-react@2.40.1_biqbaboplfbrettd7655fr4n2y/node_modules/@arco-design/web-react/es/Space/index.js");
const input = require("../../../node_modules/.pnpm/@arco-design_web-react@2.40.1_biqbaboplfbrettd7655fr4n2y/node_modules/@arco-design/web-react/es/Input/input.js");
const index$2 = require("../../../node_modules/.pnpm/@arco-design_web-react@2.40.1_biqbaboplfbrettd7655fr4n2y/node_modules/@arco-design/web-react/es/Button/index.js");
const index$3 = require("../../../node_modules/.pnpm/@arco-design_web-react@2.40.1_biqbaboplfbrettd7655fr4n2y/node_modules/@arco-design/web-react/icon/react-icon/IconDelete/index.js");
function List(props) {
  console.log("props:", props);
  return /* @__PURE__ */ emotionReactJsxRuntime_browser_esm.jsx(index.List, {
    field: props == null ? void 0 : props.name,
    children: (fields, {
      add,
      remove,
      move
    }) => {
      let values = Array.isArray(fields) ? fields : [fields];
      return /* @__PURE__ */ emotionReactJsxRuntime_browser_esm.jsxs("div", {
        children: [values && values.map((item, index$4) => {
          var _a;
          return /* @__PURE__ */ emotionReactJsxRuntime_browser_esm.jsx("div", {
            children: /* @__PURE__ */ emotionReactJsxRuntime_browser_esm.jsx(index.Item, {
              label: (props == null ? void 0 : props.label) + " " + index$4,
              children: /* @__PURE__ */ emotionReactJsxRuntime_browser_esm.jsxs(index$1, {
                children: [(_a = props.options) == null ? void 0 : _a.map((i, ii) => {
                  return /* @__PURE__ */ emotionReactJsxRuntime_browser_esm.jsx(index.Item, {
                    label: i.label,
                    field: item.field + `.${i.value}`,
                    rules: [{
                      required: i.required ? true : false
                    }],
                    noStyle: true,
                    children: /* @__PURE__ */ emotionReactJsxRuntime_browser_esm.jsx(input.default, {
                      placeholder: i.placeholder || i.label || ""
                    })
                  });
                }), /* @__PURE__ */ emotionReactJsxRuntime_browser_esm.jsx(index$2, {
                  icon: /* @__PURE__ */ emotionReactJsxRuntime_browser_esm.jsx(index$3, {}),
                  shape: "circle",
                  status: "danger",
                  onClick: () => remove(index$4)
                })]
              })
            })
          }, item.key);
        }), /* @__PURE__ */ emotionReactJsxRuntime_browser_esm.jsx(index.Item, {
          children: /* @__PURE__ */ emotionReactJsxRuntime_browser_esm.jsx(index$2, {
            onClick: () => {
              add();
            },
            children: "\u65B0\u589E"
          })
        })]
      });
    }
  });
}
exports.List = List;
//# sourceMappingURL=List.js.map
