var _excluded = ["vertical"];

function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }

import React from 'react';
import clsx from 'clsx';
import ConfigProviderContext from '../config-provider/ConfigProviderContext';
var SwiperPagIndicator = /*#__PURE__*/React.memo(function (_ref) {
  var vertical = _ref.vertical,
      props = _objectWithoutPropertiesLoose(_ref, _excluded);

  var _React$useContext = React.useContext(ConfigProviderContext),
      prefixCls = _React$useContext.prefixCls,
      createNamespace = _React$useContext.createNamespace;

  var _createNamespace = createNamespace('indicator', prefixCls),
      bem = _createNamespace[0];

  var dots = [];

  for (var i = 0; i < props.total; i++) {
    dots.push( /*#__PURE__*/React.createElement("div", {
      key: i,
      className: clsx(bem('dot', {
        active: props.current === i
      }))
    }));
  }

  return /*#__PURE__*/React.createElement("div", {
    className: clsx(props.className, bem({
      vertical: vertical
    })),
    style: props.style
  }, dots);
});
export default SwiperPagIndicator;