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); }
import React from "react";
import { Animated, Easing } from "react-native";
import Indicator from "./indicator";
const DotIndicator = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(({
  count = 4,
  size = 16,
  color = "rgb(0, 0, 0)",
  animationEasing = Easing.inOut(Easing.ease),
  ...rest
}, ref) => {
  const _renderComponent = React.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.createElement(Animated.View, {
      style: style,
      key: index
    });
  }, [size, color]);
  return /*#__PURE__*/React.createElement(Indicator, _extends({}, rest, {
    ref: ref,
    style: [{
      flexDirection: "row",
      justifyContent: "center",
      alignItems: "center"
    }, rest.style],
    animationEasing: animationEasing,
    renderComponent: _renderComponent,
    count: count
  }));
}));
export default DotIndicator;
//# sourceMappingURL=dot.js.map