import { defineComponent, computed, openBlock, createElementBlock, unref, toDisplayString, createBlock, withCtx, createVNode } from 'vue';
import { ElIcon } from '../../../icon/index2.mjs';
import { ArrowLeft } from '@element-plus/icons-vue';
import { paginationPrevProps, paginationPrevEmits } from './prev3.mjs';
import _export_sfc from '../../../../_virtual/plugin-vue_export-helper.mjs';

const _hoisted_1 = ["disabled", "aria-disabled"];
const _hoisted_2 = { key: 0 };
const __default__ = {
  name: "ElPaginationPrev"
};
const _sfc_main = /* @__PURE__ */ defineComponent({
  ...__default__,
  props: paginationPrevProps,
  emits: paginationPrevEmits,
  setup(__props) {
    const props = __props;
    const internalDisabled = computed(() => props.disabled || props.currentPage <= 1);
    return (_ctx, _cache) => {
      return openBlock(), createElementBlock("button", {
        type: "button",
        class: "btn-prev",
        disabled: unref(internalDisabled),
        "aria-disabled": unref(internalDisabled),
        onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("click", $event))
      }, [
        _ctx.prevText ? (openBlock(), createElementBlock("span", _hoisted_2, toDisplayString(_ctx.prevText), 1)) : (openBlock(), createBlock(unref(ElIcon), { key: 1 }, {
          default: withCtx(() => [
            createVNode(unref(ArrowLeft))
          ]),
          _: 1
        }))
      ], 8, _hoisted_1);
    };
  }
});
var Prev = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "/Users/wyf/work/element-plus/packages/components/pagination/src/components/prev.vue"]]);

export { Prev as default };
//# sourceMappingURL=prev4.mjs.map
