import { __rest } from "tslib";
import { jsx as _jsx } from "react/jsx-runtime";
import React from 'react';
import clsx from 'clsx';
import ConfigProviderContext from '../config-provider/ConfigProviderContext';
const SwiperPagIndicator = React.memo(_a => {
  var {
    vertical
  } = _a,
      props = __rest(_a, ["vertical"]);

  const {
    prefixCls,
    createNamespace
  } = React.useContext(ConfigProviderContext);
  const [bem] = createNamespace('indicator', prefixCls);
  const dots = [];

  for (let i = 0; i < props.total; i++) {
    dots.push(_jsx("div", {
      className: clsx(bem('dot', {
        active: props.current === i
      }))
    }, i));
  }

  return _jsx("div", Object.assign({
    className: clsx(props.className, bem({
      vertical
    })),
    style: props.style
  }, {
    children: dots
  }));
});
export default SwiperPagIndicator;