import { defineComponent, reactive, resolveComponent, openBlock, createElementBlock, createVNode, withCtx, createElementVNode } from 'vue';
import '../../../../../api/index.mjs';
import { useBaseApi } from '../../../../../api/base/index.mjs';

const _hoisted_1 = { class: "sys-upgrade-container" };
const _hoisted_2 = { style: { "color": "#fff" } };
const _hoisted_3 = ["innerHTML"];
var _sfc_main = /* @__PURE__ */ defineComponent({
  __name: "upgradeInfo",
  setup(__props, { expose: __expose }) {
    const state = reactive({
      isShowDialog: false,
      ruleForm: {}
    });
    const openDialog = (row) => {
      state.ruleForm = JSON.parse(JSON.stringify(row));
      state.isShowDialog = true;
    };
    const cancel = async () => {
      await useBaseApi("sysUpgrade").pcomm({ id: state.ruleForm.id }, "setRead");
      state.isShowDialog = false;
    };
    __expose({ openDialog });
    return (_ctx, _cache) => {
      const _component_ele_InfoFilled = resolveComponent("ele-InfoFilled");
      const _component_el_icon = resolveComponent("el-icon");
      const _component_el_dialog = resolveComponent("el-dialog");
      return openBlock(), createElementBlock("div", _hoisted_1, [
        createVNode(_component_el_dialog, {
          modelValue: state.isShowDialog,
          "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => state.isShowDialog = $event),
          draggable: "",
          "close-on-click-modal": false,
          width: "50vw",
          "before-close": cancel
        }, {
          header: withCtx(() => [
            createElementVNode("div", _hoisted_2, [
              createVNode(_component_el_icon, {
                size: "16",
                style: { "margin-right": "3px", "display": "inline", "vertical-align": "middle" }
              }, {
                default: withCtx(() => [
                  createVNode(_component_ele_InfoFilled)
                ]),
                _: 1
                /* STABLE */
              }),
              _cache[1] || (_cache[1] = createElementVNode(
                "span",
                null,
                " \u7CFB\u7EDF\u66F4\u65B0\u65E5\u5FD7 ",
                -1
                /* CACHED */
              ))
            ])
          ]),
          default: withCtx(() => [
            createElementVNode("div", {
              innerHTML: state.ruleForm.content,
              style: { "padding": "20px" }
            }, null, 8, _hoisted_3)
          ]),
          _: 1
          /* STABLE */
        }, 8, ["modelValue"])
      ]);
    };
  }
});

export { _sfc_main as default };
