/**
 * ldesign v0.4.2
 * (c) 2023 ldesign
 * @license MIT
 */

import { _ as _defineProperty } from '../_chunks/dep-eb20e23f.mjs';
import { computed } from 'vue';
import { getIEVersion } from '../_common/js/utils/helper.mjs';
import { useCommonClassName } from '../hooks/useConfig.mjs';
import '../_chunks/dep-b4041200.mjs';
import '../_chunks/dep-e091cfd9.mjs';
import '../_chunks/dep-cfcedf47.mjs';
import '../_chunks/dep-b6a73f93.mjs';
import '../_chunks/dep-55846619.mjs';
import '../_chunks/dep-1cf2b129.mjs';
import '../_chunks/dep-a0b4a044.mjs';
import '../_chunks/dep-c959a6fb.mjs';
import '../_chunks/dep-e3b14d70.mjs';
import '../_chunks/dep-66d6733b.mjs';
import '../_chunks/dep-c31e1d9e.mjs';
import '../_chunks/dep-6f89b77e.mjs';
import '../_chunks/dep-30451c48.mjs';
import '../_chunks/dep-6eea369f.mjs';
import '../config-provider/useConfig.mjs';
import '../_chunks/dep-44417261.mjs';
import '../_chunks/dep-bf74f1c2.mjs';
import '../_chunks/dep-79821ff2.mjs';
import '../_chunks/dep-0bfbf721.mjs';
import '../_chunks/dep-39cc276d.mjs';
import '../_chunks/dep-6b22dd27.mjs';
import '../_chunks/dep-0f0c89ff.mjs';
import '../_chunks/dep-8f777748.mjs';
import '../_chunks/dep-ae357f26.mjs';
import '../_chunks/dep-352691c2.mjs';
import '../_chunks/dep-2cfd5b3a.mjs';
import '../_chunks/dep-05fa17c9.mjs';
import '../_chunks/dep-a9c8a5d5.mjs';
import '../_chunks/dep-10085c61.mjs';
import '../_chunks/dep-1b058de3.mjs';
import '../_chunks/dep-c852a61a.mjs';
import '../_chunks/dep-92e7085e.mjs';
import '../_chunks/dep-44f056cd.mjs';
import '../_chunks/dep-23a0f453.mjs';
import '../_chunks/dep-99920870.mjs';
import '../_chunks/dep-c7e9ce16.mjs';
import '../_chunks/dep-3afa94cf.mjs';
import '../_chunks/dep-ba3c0b2e.mjs';
import '../_chunks/dep-ee57d235.mjs';
import '../_common/js/global-config/default-config.mjs';
import '../_common/js/global-config/locale/zh_CN.mjs';
import '../_chunks/dep-6b4aa943.mjs';
import '../_chunks/dep-d52291a9.mjs';
import '../config-provider/type.mjs';

function usePaginationClasses(props, innerCurrent, innerPageSize, name) {
  var _useCommonClassName = useCommonClassName(),
    SIZE = _useCommonClassName.SIZE,
    STATUS = _useCommonClassName.STATUS;
  var pageCount = computed(function () {
    var c = Math.ceil(props.total / innerPageSize.value);
    return c > 0 ? c : 1;
  });
  var paginationClass = computed(function () {
    var _ref;
    return ["".concat(name.value), SIZE.value[props.size], (_ref = {}, _defineProperty(_ref, STATUS.value.disabled, props.disabled), _defineProperty(_ref, "".concat(name.value, "-ie"), getIEVersion() < 11), _ref)];
  });
  var totalClass = computed(function () {
    return ["".concat(name.value, "__total")];
  });
  var sizerClass = computed(function () {
    return ["".concat(name.value, "__select")];
  });
  var preBtnClass = computed(function () {
    return ["".concat(name.value, "__btn"), "".concat(name.value, "__btn-prev"), _defineProperty({}, STATUS.value.disabled, props.disabled || innerCurrent.value === 1)];
  });
  var nextBtnClass = computed(function () {
    return ["".concat(name.value, "__btn"), "".concat(name.value, "__btn-next"), _defineProperty({}, STATUS.value.disabled, props.disabled || innerCurrent.value === pageCount.value)];
  });
  var btnWrapClass = computed(function () {
    return ["".concat(name.value, "__pager")];
  });
  var btnMoreClass = computed(function () {
    return ["".concat(name.value, "__number"), "".concat(name.value, "__number--more"), _defineProperty({}, STATUS.value.disabled, props.disabled)];
  });
  var jumperClass = computed(function () {
    return ["".concat(name.value, "__jump")];
  });
  var jumperInputClass = computed(function () {
    return ["".concat(name.value, "__input")];
  });
  var simpleClass = computed(function () {
    return ["".concat(name.value, "__select")];
  });
  var getButtonClass = function getButtonClass(index) {
    var _ref5;
    return ["".concat(name.value, "__number"), (_ref5 = {}, _defineProperty(_ref5, STATUS.value.disabled, props.disabled), _defineProperty(_ref5, STATUS.value.current, innerCurrent.value === index), _ref5)];
  };
  return {
    pageCount: pageCount,
    paginationClass: paginationClass,
    totalClass: totalClass,
    sizerClass: sizerClass,
    preBtnClass: preBtnClass,
    nextBtnClass: nextBtnClass,
    btnWrapClass: btnWrapClass,
    btnMoreClass: btnMoreClass,
    jumperClass: jumperClass,
    jumperInputClass: jumperInputClass,
    simpleClass: simpleClass,
    getButtonClass: getButtonClass
  };
}

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