"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
var _reactNative = require("react-native");
var _indicator = _interopRequireDefault(require("./indicator"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
const DotIndicator = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.default.forwardRef(({
  count = 4,
  size = 16,
  color = "rgb(0, 0, 0)",
  animationEasing = _reactNative.Easing.inOut(_reactNative.Easing.ease),
  ...rest
}, ref) => {
  const _renderComponent = _react.default.useCallback(({
    index,
    count,
    progress
  }) => {
    let style = {
      width: size,
      height: size,
      margin: size / 2,
      borderRadius: size / 2,
      backgroundColor: color,
      transform: [{
        scale: progress.interpolate({
          inputRange: [0.0, (index + 0.5) / (count + 1), (index + 1.0) / (count + 1), (index + 1.5) / (count + 1), 1.0],
          outputRange: [1.0, 1.36, 1.56, 1.06, 1.0]
        })
      }]
    };
    return /*#__PURE__*/_react.default.createElement(_reactNative.Animated.View, {
      style: style,
      key: index
    });
  }, [size, color]);
  return /*#__PURE__*/_react.default.createElement(_indicator.default, _extends({}, rest, {
    ref: ref,
    style: [{
      flexDirection: "row",
      justifyContent: "center",
      alignItems: "center"
    }, rest.style],
    animationEasing: animationEasing,
    renderComponent: _renderComponent,
    count: count
  }));
}));
var _default = exports.default = DotIndicator;
//# sourceMappingURL=dot.js.map