import { computed, createBlock, openBlock, unref, mergeProps, isRef, withCtx, createVNode } from "vue";
import { MobileField } from "../field/index.mjs";
import { MobileUploader } from "../uploader/index.mjs";
const _sfc_main = {
  __name: "FieldUploader",
  props: {
    modelValue: {
      type: Array,
      default: []
    },
    readonly: {
      type: Boolean,
      default: false
    }
  },
  emits: ["update:modelValue"],
  setup(__props, { emit: __emit }) {
    const props = __props;
    const emit = __emit;
    const compValue = computed({
      get: () => {
        return props.modelValue;
      },
      set: (val) => {
        emit("update:modelValue", val);
      }
    });
    const fieldTextValue = computed(() => {
      return "";
    });
    return (_ctx, _cache) => {
      return openBlock(), createBlock(unref(MobileField), mergeProps(_ctx.$attrs, {
        readonly: "",
        modelValue: unref(fieldTextValue),
        "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => isRef(fieldTextValue) ? fieldTextValue.value = $event : null)
      }), {
        input: withCtx(() => [
          createVNode(unref(MobileUploader), mergeProps(_ctx.$attrs, {
            readonly: __props.readonly,
            modelValue: unref(compValue),
            "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(compValue) ? compValue.value = $event : null)
          }), null, 16, ["readonly", "modelValue"])
        ]),
        _: 1
      }, 16, ["modelValue"]);
    };
  }
};
export {
  _sfc_main as default
};
