"use strict";
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
const index = require("../../../../hooks/use-locale/index.js");
const index$1 = require("../../../icon/index.js");
const prev = require("./prev.js");
const Vue = require("vue");
const _hoisted_1 = [
  "disabled",
  "aria-label",
  "aria-disabled"
];
const _hoisted_2 = { key: 0 };
var prev_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ Vue.defineComponent({
  name: "ElPaginationPrev",
  __name: "prev",
  props: prev.paginationPrevProps,
  emits: prev.paginationPrevEmits,
  setup(__props) {
    const props = __props;
    const { t } = index.useLocale();
    const internalDisabled = Vue.computed(() => props.disabled || props.currentPage <= 1);
    return (_ctx, _cache) => {
      return Vue.openBlock(), Vue.createElementBlock("button", {
        type: "button",
        class: "btn-prev",
        disabled: internalDisabled.value,
        "aria-label": _ctx.prevText || Vue.unref(t)("el.pagination.prev"),
        "aria-disabled": internalDisabled.value,
        onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("click", $event))
      }, [_ctx.prevText ? (Vue.openBlock(), Vue.createElementBlock("span", _hoisted_2, Vue.toDisplayString(_ctx.prevText), 1)) : (Vue.openBlock(), Vue.createBlock(Vue.unref(index$1.ElIcon), { key: 1 }, {
        default: Vue.withCtx(() => [(Vue.openBlock(), Vue.createBlock(Vue.resolveDynamicComponent(_ctx.prevIcon)))]),
        _: 1
      }))], 8, _hoisted_1);
    };
  }
});
exports.default = prev_vue_vue_type_script_setup_true_lang_default;
