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

import { _ as _defineProperty } from '../_chunks/dep-2db7b3ec.mjs';
import { computed } from 'vue';
import { getIEVersion } from '../_common/js/utils/helper.mjs';
import { useCommonClassName } from '../hooks/useConfig.mjs';
import '../_chunks/dep-255303ba.mjs';
import '../_chunks/dep-bf1e33c8.mjs';
import '../_chunks/dep-b8d7992c.mjs';
import '../_chunks/dep-60fae668.mjs';
import '../_chunks/dep-84acf3c2.mjs';
import '../_chunks/dep-876fb3ec.mjs';
import '../_chunks/dep-eba0ea6e.mjs';
import '../_chunks/dep-469b4ae0.mjs';
import '../_chunks/dep-b57180d0.mjs';
import '../_chunks/dep-c8d7b6b4.mjs';
import '../_chunks/dep-3da99438.mjs';
import '../_chunks/dep-ed5ebb35.mjs';
import '../_chunks/dep-78847b2e.mjs';
import '../_chunks/dep-3f21269a.mjs';
import '../config-provider/useConfig.mjs';
import '../_chunks/dep-095107f7.mjs';
import '../_chunks/dep-c989dff3.mjs';
import '../_chunks/dep-9cf86cf1.mjs';
import '../_chunks/dep-bc1d737a.mjs';
import '../_chunks/dep-4d7a675b.mjs';
import '../_chunks/dep-5717e263.mjs';
import '../_chunks/dep-a8bcacea.mjs';
import '../_chunks/dep-2e7f59b1.mjs';
import '../_chunks/dep-855db8bc.mjs';
import '../_chunks/dep-a87f3e4c.mjs';
import '../_chunks/dep-1e566bb5.mjs';
import '../_chunks/dep-1434aa15.mjs';
import '../_chunks/dep-e5eb9f23.mjs';
import '../_chunks/dep-9fe2ef12.mjs';
import '../_chunks/dep-672e7d1a.mjs';
import '../_chunks/dep-42a19209.mjs';
import '../_chunks/dep-9262ee2f.mjs';
import '../_chunks/dep-334a4f6b.mjs';
import '../_chunks/dep-8d3e9aa3.mjs';
import '../_chunks/dep-40d69a9c.mjs';
import '../_chunks/dep-dcc83161.mjs';
import '../_chunks/dep-0fc02184.mjs';
import '../_chunks/dep-f1994936.mjs';
import '../_chunks/dep-345e1be3.mjs';
import '../_common/js/global-config/default-config.mjs';
import '../_common/js/global-config/locale/zh_CN.mjs';
import '../_chunks/dep-9888611c.mjs';
import '../_chunks/dep-697a1365.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
