"use strict";
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
const Vue = require("vue");
const common = require("../../utils/common.js");
const path = "/bus/module/comm/risk/components/RiskInterceptResult";
const _sfc_main = /* @__PURE__ */ Object.assign({
  inheritAttrs: false
}, {
  __name: "RiskSchRenderer",
  props: {
    // 是否显示
    modelValue: {
      type: Boolean,
      default: false
    },
    ctx: {
      type: Object,
      default: {}
    },
    schNo: {
      type: String,
      default: ""
    },
    busNo: {
      type: String,
      default: ""
    },
    paramList: {
      type: Object,
      default: {}
    }
  },
  emits: ["update:modelValue", "confirm", "cancel"],
  setup(__props, { emit: __emit }) {
    const props = __props;
    const emit = __emit;
    const dialogVisible = Vue.ref(false);
    Vue.watch(
      () => {
        return props.modelValue;
      },
      (val) => {
        dialogVisible.value = val;
      },
      {
        immediate: true
      }
    );
    Vue.watch(dialogVisible, (val) => {
      emit("update:modelValue", val);
    });
    function confirm(data) {
      emit("confirm", data);
    }
    function cancel(data) {
      emit("cancel", data);
    }
    const currentComponent = Vue.ref(null);
    Vue.onMounted(() => {
      common.loadComponentByPath(path, props.ctx.$router, currentComponent);
    });
    return (_ctx, _cache) => {
      return Vue.openBlock(), Vue.createBlock(Vue.resolveDynamicComponent(Vue.unref(currentComponent)), {
        modelValue: Vue.unref(dialogVisible),
        "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => Vue.isRef(dialogVisible) ? dialogVisible.value = $event : null),
        schNo: __props.schNo,
        busNo: __props.busNo,
        paramList: __props.paramList,
        onConfirm: confirm,
        onCancel: cancel
      }, null, 40, ["modelValue", "schNo", "busNo", "paramList"]);
    };
  }
});
exports.default = _sfc_main;
