import "../../../../../../node_modules/element-plus/es/index.mjs";
/* empty css                                                                */
/* empty css                                                                   */
/* empty css                                                                        */
import { ref, createBlock, openBlock, withCtx, renderSlot } from "vue";
/* empty css           */
import _export_sfc from "../../../../../../_virtual/_plugin-vue_export-helper.mjs";
import { ElMain } from "../../../../../../node_modules/element-plus/es/components/container/index.mjs";
import { ElScrollbar } from "../../../../../../node_modules/element-plus/es/components/scrollbar/index.mjs";
const _sfc_main = {
  __name: "Main",
  props: {
    scrollbar: {
      type: Boolean,
      default: true
    }
  },
  emits: ["scroll"],
  setup(__props, { expose: __expose, emit: __emit }) {
    const props = __props;
    const emit = __emit;
    function scroll(data) {
      emit("scroll", data);
    }
    const scrollbarRef = ref();
    function scrollTo(num) {
      scrollbarRef.value.scrollTo({ behavior: "smooth", top: num });
    }
    __expose({
      scrollTo
    });
    return (_ctx, _cache) => {
      const _component_el_scrollbar = ElScrollbar;
      const _component_el_main = ElMain;
      return openBlock(), createBlock(_component_el_main, { class: "fec-el-main" }, {
        default: withCtx(() => [
          props.scrollbar ? (openBlock(), createBlock(_component_el_scrollbar, {
            key: 0,
            ref_key: "scrollbarRef",
            ref: scrollbarRef,
            onScroll: scroll,
            style: { "flex": "1" }
          }, {
            default: withCtx(() => [
              renderSlot(_ctx.$slots, "default", {}, void 0, true)
            ]),
            _: 3
          }, 512)) : renderSlot(_ctx.$slots, "default", { key: 1 }, void 0, true)
        ]),
        _: 3
      });
    };
  }
};
const component = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-a59457ae"]]);
export {
  component as default
};
