import { defineComponent, ref, resolveComponent, createBlock, openBlock, withCtx, createElementVNode, createVNode } from 'vue';

"use strict";
const _hoisted_1 = { style: { padding: "24px 40px 0" } };
var _sfc_main = /* @__PURE__ */ defineComponent({
  ...{ name: "CustomSearcherSchemeName" },
  __name: "scheme-name",
  props: {
    open: { type: Boolean, required: true }
  },
  emits: ["cancel", "ok"],
  setup(__props, { emit: __emit }) {
    const formCols = 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 = ref();
    const onSave = async () => {
      await formRef.value.validate();
      emits("ok", formData.value.name);
    };
    const formData = ref({ name: "" });
    return (_ctx, _cache) => {
      const _component_ll_form = resolveComponent("ll-form");
      const _component_ll_new_modal = resolveComponent("ll-new-modal");
      return openBlock(), 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: withCtx(() => [
          createElementVNode("div", _hoisted_1, [
            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"]);
    };
  }
});

export { _sfc_main as default };
//# sourceMappingURL=scheme-name.vue2.mjs.map
