"use strict";

import { useContext } from 'react';
import { View } from 'react-native';
import Dot from "./Dot.js";
import { ApplicationContext } from "../Context/index.js";
import { Spacing } from "../Consts/index.js";
import styles from "./styles.js";
import { jsx as _jsx } from "react/jsx-runtime";
const PaginationDot = ({
  dataLength = 2,
  activeIndex = 0
}) => {
  const {
    theme
  } = useContext(ApplicationContext);
  const renderDots = () => {
    const dots = [];
    for (let i = 0; i < dataLength; i++) {
      dots.push(/*#__PURE__*/_jsx(Dot, {
        style: [i !== dataLength - 1 ? {
          marginRight: Spacing.XS
        } : {}, {
          backgroundColor: theme.colors.primary.default
        }],
        active: activeIndex === i
      }, `Dot${i}`));
    }
    return dots;
  };
  return /*#__PURE__*/_jsx(View, {
    style: styles.paginationPinkContainer,
    children: renderDots()
  });
};
export default PaginationDot;
//# sourceMappingURL=PaginationDot.js.map