import "../../../../../../node_modules/element-plus/es/index.mjs";
/* empty css                                                                */
/* empty css                                                                     */
/* empty css                                                                    */
/* empty css                                                                           */
/* empty css                                                                        */
import { createElementBlock, openBlock, Fragment, createVNode, withCtx, unref, createElementVNode } from "vue";
import _sfc_main$1 from "../../../../components/DataSourceSelect.vue.mjs";
import _sfc_main$2 from "../../../../components/FileTypeSelect.vue.mjs";
/* empty css            */
import _export_sfc from "../../../../../../_virtual/_plugin-vue_export-helper.mjs";
import { ElFormItem } from "../../../../../../node_modules/element-plus/es/components/form/index.mjs";
import { ElInputNumber } from "../../../../../../node_modules/element-plus/es/components/input-number/index.mjs";
import { ElSwitch } from "../../../../../../node_modules/element-plus/es/components/switch/index.mjs";
const _hoisted_1 = { class: "desc-content" };
const _sfc_main = {
  __name: "Upload",
  props: {
    formData: Object
  },
  setup(__props) {
    const props = __props;
    const formData = props.formData;
    if (!formData.acceptType) {
      formData.acceptType = [];
    }
    return (_ctx, _cache) => {
      const _component_el_form_item = ElFormItem;
      const _component_el_input_number = ElInputNumber;
      const _component_el_switch = ElSwitch;
      return openBlock(), createElementBlock(Fragment, null, [
        createVNode(_component_el_form_item, { label: "选择数据源" }, {
          default: withCtx(() => [
            createVNode(_sfc_main$1, {
              modelValue: unref(formData).dataSourceId,
              "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => unref(formData).dataSourceId = $event)
            }, null, 8, ["modelValue"])
          ]),
          _: 1
        }),
        createVNode(_component_el_form_item, { label: "允许上传的文件类型" }, {
          default: withCtx(() => [
            createVNode(_sfc_main$2, {
              modelValue: unref(formData).acceptType,
              "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => unref(formData).acceptType = $event)
            }, null, 8, ["modelValue"])
          ]),
          _: 1
        }),
        createVNode(_component_el_form_item, { label: "文件大小限制" }, {
          default: withCtx(() => [
            createElementVNode("div", _hoisted_1, [
              createVNode(_component_el_input_number, {
                modelValue: unref(formData).maxSize,
                "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => unref(formData).maxSize = $event),
                min: 0
              }, null, 8, ["modelValue"]),
              _cache[4] || (_cache[4] = createElementVNode("div", { class: "condition-desc" }, "单位 MB, 填0不限制。", -1))
            ])
          ]),
          _: 1
        }),
        createVNode(_component_el_form_item, { label: "允许多选" }, {
          default: withCtx(() => [
            createVNode(_component_el_switch, {
              modelValue: unref(formData).multipleUpload,
              "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => unref(formData).multipleUpload = $event)
            }, null, 8, ["modelValue"])
          ]),
          _: 1
        })
      ], 64);
    };
  }
};
const Upload = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-b73022da"]]);
export {
  Upload as default
};
