"use strict";
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
require("../../../../../../node_modules/element-plus/es/index.js");
;/* empty css                                                                */
;/* empty css                                                                     */
;/* empty css                                                                    */
;/* empty css                                                                           */
;/* empty css                                                                        */
const Vue = require("vue");
const DataSourceSelect = require("../../../../components/DataSourceSelect.vue.js");
const FileTypeSelect = require("../../../../components/FileTypeSelect.vue.js");
;/* empty css            */
const _pluginVue_exportHelper = require("../../../../../../_virtual/_plugin-vue_export-helper.js");
const index = require("../../../../../../node_modules/element-plus/es/components/form/index.js");
const index$1 = require("../../../../../../node_modules/element-plus/es/components/input-number/index.js");
const index$2 = require("../../../../../../node_modules/element-plus/es/components/switch/index.js");
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 = index.ElFormItem;
      const _component_el_input_number = index$1.ElInputNumber;
      const _component_el_switch = index$2.ElSwitch;
      return Vue.openBlock(), Vue.createElementBlock(Vue.Fragment, null, [
        Vue.createVNode(_component_el_form_item, { label: "选择数据源" }, {
          default: Vue.withCtx(() => [
            Vue.createVNode(DataSourceSelect.default, {
              modelValue: Vue.unref(formData).dataSourceId,
              "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => Vue.unref(formData).dataSourceId = $event)
            }, null, 8, ["modelValue"])
          ]),
          _: 1
        }),
        Vue.createVNode(_component_el_form_item, { label: "允许上传的文件类型" }, {
          default: Vue.withCtx(() => [
            Vue.createVNode(FileTypeSelect.default, {
              modelValue: Vue.unref(formData).acceptType,
              "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => Vue.unref(formData).acceptType = $event)
            }, null, 8, ["modelValue"])
          ]),
          _: 1
        }),
        Vue.createVNode(_component_el_form_item, { label: "文件大小限制" }, {
          default: Vue.withCtx(() => [
            Vue.createElementVNode("div", _hoisted_1, [
              Vue.createVNode(_component_el_input_number, {
                modelValue: Vue.unref(formData).maxSize,
                "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => Vue.unref(formData).maxSize = $event),
                min: 0
              }, null, 8, ["modelValue"]),
              _cache[4] || (_cache[4] = Vue.createElementVNode("div", { class: "condition-desc" }, "单位 MB, 填0不限制。", -1))
            ])
          ]),
          _: 1
        }),
        Vue.createVNode(_component_el_form_item, { label: "允许多选" }, {
          default: Vue.withCtx(() => [
            Vue.createVNode(_component_el_switch, {
              modelValue: Vue.unref(formData).multipleUpload,
              "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => Vue.unref(formData).multipleUpload = $event)
            }, null, 8, ["modelValue"])
          ]),
          _: 1
        })
      ], 64);
    };
  }
};
const Upload = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-b73022da"]]);
exports.default = Upload;
