"use strict";
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
require("../../../../../node_modules/element-plus/es/index.js");
;/* empty css                                                             */
;/* empty css                                                                    */
;/* empty css                                                                         */
;/* empty css                                                                */
;/* empty css                                                                  */
;/* empty css                                                                     */
;/* empty css                                                                 */
;/* empty css                                                                       */
;/* empty css                                                                        */
const Vue = require("vue");
const common = require("../../utils/common.js");
const index = require("../../../../../node_modules/element-plus/es/components/collapse/index.js");
const index$1 = require("../../../../../node_modules/element-plus/es/components/form/index.js");
const index$2 = require("../../../../../node_modules/element-plus/es/components/radio/index.js");
const index$3 = require("../../../../../node_modules/element-plus/es/components/switch/index.js");
const _sfc_main = {
  __name: "filterWidgets",
  setup(__props) {
    const currentItem = Vue.computed(() => {
      return common.getCurrentItem();
    });
    const activeName = Vue.ref(["common"]);
    const editConfigData = Vue.computed(() => common.getEditConfigData());
    const fieldInfo = Vue.computed(() => {
      var _a, _b;
      const fieldId = (_a = currentItem.value) == null ? void 0 : _a.fieldId;
      if (!fieldId) return null;
      const allFields = ((_b = editConfigData.value) == null ? void 0 : _b.fieldsData) || [];
      return allFields.find((f) => f.id === fieldId);
    });
    return (_ctx, _cache) => {
      const _component_el_radio_button = index$2.ElRadioButton;
      const _component_el_radio_group = index$2.ElRadioGroup;
      const _component_el_form_item = index$1.ElFormItem;
      const _component_el_switch = index$3.ElSwitch;
      const _component_el_form = index$1.ElForm;
      const _component_el_collapse_item = index.ElCollapseItem;
      const _component_el_collapse = index.ElCollapse;
      return Vue.openBlock(), Vue.createBlock(_component_el_collapse, {
        class: "setting",
        modelValue: Vue.unref(activeName),
        "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => Vue.isRef(activeName) ? activeName.value = $event : null)
      }, {
        default: Vue.withCtx(() => [
          Vue.createVNode(_component_el_collapse_item, {
            name: "common",
            title: "基本属性"
          }, {
            default: Vue.withCtx(() => [
              Vue.createVNode(_component_el_form, {
                "label-position": "top",
                "label-width": "auto",
                model: currentItem.value
              }, {
                default: Vue.withCtx(() => {
                  var _a, _b, _c, _d, _e, _f;
                  return [
                    ((_a = fieldInfo.value) == null ? void 0 : _a.fieldType) === "text" || ((_b = fieldInfo.value) == null ? void 0 : _b.fieldType) === "textarea" ? (Vue.openBlock(), Vue.createBlock(_component_el_form_item, {
                      key: 0,
                      label: "查询类型"
                    }, {
                      default: Vue.withCtx(() => [
                        Vue.createVNode(_component_el_radio_group, {
                          modelValue: currentItem.value.queryType,
                          "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => currentItem.value.queryType = $event)
                        }, {
                          default: Vue.withCtx(() => [
                            Vue.createVNode(_component_el_radio_button, { value: "exact" }, {
                              default: Vue.withCtx(() => _cache[4] || (_cache[4] = [
                                Vue.createTextVNode("精准查询")
                              ])),
                              _: 1
                            }),
                            Vue.createVNode(_component_el_radio_button, { value: "fuzzy" }, {
                              default: Vue.withCtx(() => _cache[5] || (_cache[5] = [
                                Vue.createTextVNode("模糊查询")
                              ])),
                              _: 1
                            })
                          ]),
                          _: 1
                        }, 8, ["modelValue"])
                      ]),
                      _: 1
                    })) : Vue.createCommentVNode("", true),
                    editConfigData.value.queryConfig.mode === "dynamic" ? (Vue.openBlock(), Vue.createElementBlock(Vue.Fragment, { key: 1 }, [
                      Vue.createVNode(_component_el_form_item, { label: "独占一行" }, {
                        default: Vue.withCtx(() => [
                          Vue.createVNode(_component_el_switch, {
                            modelValue: currentItem.value.isExclusiveRow,
                            "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => currentItem.value.isExclusiveRow = $event)
                          }, null, 8, ["modelValue"])
                        ]),
                        _: 1
                      }),
                      ((_c = fieldInfo.value) == null ? void 0 : _c.fieldType) === "radio" || ((_d = fieldInfo.value) == null ? void 0 : _d.fieldType) === "checkbox" || ((_e = fieldInfo.value) == null ? void 0 : _e.fieldType) === "select" || ((_f = fieldInfo.value) == null ? void 0 : _f.fieldType) === "multipleSelection" ? (Vue.openBlock(), Vue.createBlock(_component_el_form_item, {
                        key: 0,
                        label: "按钮样式"
                      }, {
                        default: Vue.withCtx(() => [
                          Vue.createVNode(_component_el_switch, {
                            modelValue: currentItem.value.isButtonStyle,
                            "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => currentItem.value.isButtonStyle = $event)
                          }, null, 8, ["modelValue"])
                        ]),
                        _: 1
                      })) : Vue.createCommentVNode("", true)
                    ], 64)) : Vue.createCommentVNode("", true)
                  ];
                }),
                _: 1
              }, 8, ["model"])
            ]),
            _: 1
          })
        ]),
        _: 1
      }, 8, ["modelValue"]);
    };
  }
};
exports.default = _sfc_main;
