'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

var vue = require('vue');

"use strict";
const _hoisted_1 = { style: { padding: "24px 40px 0" } };
var _sfc_main = /* @__PURE__ */ vue.defineComponent({
  ...{ name: "CustomSearcherSchemeName" },
  __name: "scheme-name",
  props: {
    open: { type: Boolean, required: true }
  },
  emits: ["cancel", "ok"],
  setup(__props, { emit: __emit }) {
    const formCols = vue.ref([
      {
        label: "\u65B9\u6848\u540D\u79F0",
        key: "name",
        type: "input",
        labelCol: {
          span: 24
        },
        placeholder: "\u8BF7\u8F93\u5165",
        rules: [
          {
            required: true,
            trigger: ["blur"],
            message: "\u8BF7\u8F93\u5165\u65B9\u6848\u540D\u79F0"
          }
        ]
      }
    ]);
    const emits = __emit;
    const formRef = vue.ref();
    const onSave = async () => {
      await formRef.value.validate();
      emits("ok", formData.value.name);
    };
    const formData = vue.ref({ name: "" });
    return (_ctx, _cache) => {
      const _component_ll_form = vue.resolveComponent("ll-form");
      const _component_ll_new_modal = vue.resolveComponent("ll-new-modal");
      return vue.openBlock(), vue.createBlock(_component_ll_new_modal, {
        open: __props.open,
        title: "\u4FDD\u5B58\u65B9\u6848",
        "mask-closable": false,
        "z-index": 1050,
        onCancel: _cache[0] || (_cache[0] = ($event) => emits("cancel")),
        onOk: onSave
      }, {
        default: vue.withCtx(() => [
          vue.createElementVNode("div", _hoisted_1, [
            vue.createVNode(_component_ll_form, {
              ref_key: "formRef",
              ref: formRef,
              "form-columns": formCols.value,
              "form-data": formData.value,
              "form-options": { layout: "horizontal" }
            }, null, 8, ["form-columns", "form-data"])
          ])
        ]),
        _: 1
        /* STABLE */
      }, 8, ["open"]);
    };
  }
});

exports.default = _sfc_main;
//# sourceMappingURL=scheme-name.vue2.js.map
