"use strict";
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
const Vue = require("vue");
const index$1 = require("../cascader/index.js");
const getInstance = require("../../../utils/getInstance.js");
const index = require("../../../api/index.js");
const _sfc_main = /* @__PURE__ */ Object.assign({
  inheritAttrs: false
}, {
  __name: "Industry",
  props: {
    config: {
      type: Object,
      required: true
    },
    modelValue: {
      type: [String, Number, Array],
      default: ""
    },
    placeholder: {
      type: String,
      default: "请选择"
    },
    disabled: {
      type: Boolean,
      default: false
    },
    readonly: {
      type: Boolean,
      default: false
    },
    multiple: {
      type: Boolean,
      default: false
    },
    showFullPath: {
      type: Boolean,
      default: true
    },
    maxLevel: {
      type: Number,
      default: 10
    },
    checkStrictly: {
      type: Boolean,
      default: false
    }
  },
  emits: ["update:modelValue", "change"],
  setup(__props, { emit: __emit }) {
    const props = __props;
    const emit = __emit;
    const propsData = Vue.ref({
      value: "optCode",
      label: "optName"
    });
    const ctx = getInstance.getCurrentVueInstance();
    const inputValue = Vue.computed({
      get: () => {
        return props.modelValue;
      },
      set: (val) => {
        emit("update:modelValue", val);
        emit("change", val);
      }
    });
    const optionConfig = Vue.ref({
      idField: "dicId",
      pidField: "pdicId"
    });
    index.default.getDataDicTrade4Cascader(ctx.$http).then((data) => {
      optionConfig.value.options = data;
    });
    return (_ctx, _cache) => {
      return Vue.openBlock(), Vue.createBlock(Vue.unref(index$1.Cascader), {
        modelValue: Vue.unref(inputValue),
        "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => Vue.isRef(inputValue) ? inputValue.value = $event : null),
        config: __props.config,
        placeholder: __props.placeholder,
        showFullPath: __props.showFullPath,
        disabled: __props.disabled,
        readonly: __props.readonly,
        optionConfig: Vue.unref(optionConfig),
        multiple: __props.multiple,
        maxLevel: __props.maxLevel,
        propsData: Vue.unref(propsData),
        checkStrictly: __props.checkStrictly
      }, null, 8, ["modelValue", "config", "placeholder", "showFullPath", "disabled", "readonly", "optionConfig", "multiple", "maxLevel", "propsData", "checkStrictly"]);
    };
  }
});
exports.default = _sfc_main;
