import "../../../../../node_modules/element-plus/es/index.mjs";
/* empty css                                                             */
/* empty css                                                                    */
/* empty css                                                                         */
/* empty css                                                                */
/* empty css                                                                 */
/* empty css                                                                       */
/* empty css                                                                        */
/* empty css                                                                     */
/* empty css                                                                 */
import { computed, ref, createBlock, openBlock, unref, isRef, withCtx, createVNode, createCommentVNode, createTextVNode } from "vue";
import { getCurrentItem } from "../../utils/common.mjs";
import { ElCollapse, ElCollapseItem } from "../../../../../node_modules/element-plus/es/components/collapse/index.mjs";
import { ElForm, ElFormItem } from "../../../../../node_modules/element-plus/es/components/form/index.mjs";
import { ElInput } from "../../../../../node_modules/element-plus/es/components/input/index.mjs";
import { ElRadioGroup, ElRadioButton } from "../../../../../node_modules/element-plus/es/components/radio/index.mjs";
const _sfc_main = {
  __name: "subTitleH2",
  setup(__props) {
    const currentItem = computed(() => {
      return getCurrentItem();
    });
    const activeName = ref(["common"]);
    return (_ctx, _cache) => {
      const _component_el_input = ElInput;
      const _component_el_form_item = ElFormItem;
      const _component_el_radio_button = ElRadioButton;
      const _component_el_radio_group = ElRadioGroup;
      const _component_el_form = ElForm;
      const _component_el_collapse_item = ElCollapseItem;
      const _component_el_collapse = ElCollapse;
      return openBlock(), createBlock(_component_el_collapse, {
        class: "setting",
        modelValue: unref(activeName),
        "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => isRef(activeName) ? activeName.value = $event : null)
      }, {
        default: withCtx(() => [
          createVNode(_component_el_collapse_item, {
            name: "common",
            title: "基本属性"
          }, {
            default: withCtx(() => [
              (openBlock(), createBlock(_component_el_form, {
                "label-position": "top",
                "label-width": "auto",
                model: unref(currentItem),
                key: unref(currentItem).id
              }, {
                default: withCtx(() => [
                  createVNode(_component_el_form_item, {
                    label: "标题",
                    required: ""
                  }, {
                    default: withCtx(() => [
                      createVNode(_component_el_input, {
                        modelValue: unref(currentItem).label,
                        "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => unref(currentItem).label = $event)
                      }, null, 8, ["modelValue"])
                    ]),
                    _: 1
                  }),
                  unref(currentItem).fieldType == "H2" ? (openBlock(), createBlock(_component_el_form_item, {
                    key: 0,
                    label: "副标题",
                    required: ""
                  }, {
                    default: withCtx(() => [
                      createVNode(_component_el_input, {
                        modelValue: unref(currentItem).subLabel,
                        "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => unref(currentItem).subLabel = $event),
                        rows: 2,
                        type: "textarea",
                        resize: "none"
                      }, null, 8, ["modelValue"])
                    ]),
                    _: 1
                  })) : createCommentVNode("", true),
                  createVNode(_component_el_form_item, { label: "显示模式" }, {
                    default: withCtx(() => [
                      createVNode(_component_el_radio_group, {
                        modelValue: unref(currentItem).displayMode,
                        "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => unref(currentItem).displayMode = $event),
                        size: "small"
                      }, {
                        default: withCtx(() => [
                          createVNode(_component_el_radio_button, { value: "all" }, {
                            default: withCtx(() => _cache[4] || (_cache[4] = [
                              createTextVNode("始终显示")
                            ])),
                            _: 1
                          }),
                          createVNode(_component_el_radio_button, { value: "edit" }, {
                            default: withCtx(() => _cache[5] || (_cache[5] = [
                              createTextVNode("编辑时显示")
                            ])),
                            _: 1
                          }),
                          createVNode(_component_el_radio_button, { value: "query" }, {
                            default: withCtx(() => _cache[6] || (_cache[6] = [
                              createTextVNode("查看时显示")
                            ])),
                            _: 1
                          })
                        ]),
                        _: 1
                      }, 8, ["modelValue"])
                    ]),
                    _: 1
                  })
                ]),
                _: 1
              }, 8, ["model"]))
            ]),
            _: 1
          })
        ]),
        _: 1
      }, 8, ["modelValue"]);
    };
  }
};
export {
  _sfc_main as default
};
