"use strict";
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
  for (var name in all)
    __defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
  if (from && typeof from === "object" || typeof from === "function") {
    for (let key of __getOwnPropNames(from))
      if (!__hasOwnProp.call(to, key) && key !== except)
        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
  }
  return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
  // If the importer is in node compatibility mode or this is not an ESM
  // file that has been converted to a CommonJS file using a Babel-
  // compatible transform (i.e. "__esModule" has not been set), then set
  // "default" to the CommonJS "module.exports" for node compatibility.
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
  mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var Dots_exports = {};
__export(Dots_exports, {
  default: () => Dots_default
});
module.exports = __toCommonJS(Dots_exports);
var import_jsx_runtime = require("react/jsx-runtime");
var import_react = __toESM(require("react"));
var import_prop_types = require("prop-types");
var import_styled_components = __toESM(require("styled-components"));
var import_Text = __toESM(require("../../Text"));
var import_activeDot = __toESM(require("../activeDot"));
const Wrapper = import_styled_components.default.View`
  flex-direction: row;
  justify-content: space-between;
`;
const DotWrapper = import_styled_components.default.View`
  width: 15px;
`;
const Dot = import_styled_components.default.View(
  ({
    active,
    secondary,
    theme: {
      yoga: {
        components: { stepper }
      }
    }
  }) => {
    const state = secondary ? "secondary" : "active";
    return import_styled_components.css`
      width: 15px;
      height: 15px;
      margin-top: -6px;

      border-radius: ${stepper.dot.radius}px;
      background-color: ${active ? stepper.dot.backgroundColor[state] : stepper.dot.backgroundColor.inactive};
    `;
  }
);
const Label = (0, import_styled_components.default)(import_Text.default.Overline)(
  ({
    active,
    secondary,
    theme: {
      yoga: {
        components: { stepper }
      }
    }
  }) => {
    const state = secondary ? "secondary" : "active";
    return import_styled_components.css`
      width: 95px;
      margin-top: 10px;
      margin-left: -40px;
      color: ${active ? stepper.label.color[state] : stepper.label.color.inactive};
      text-align: center;
    `;
  }
);
function Dots({ activeStep = 0, labels = [], secondary = false }) {
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Wrapper, { children: labels.map((label, index) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(DotWrapper, { children: [
    /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Dot, { active: (0, import_activeDot.default)(index, activeStep), secondary }),
    /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Label, { active: (0, import_activeDot.default)(index, activeStep), secondary, children: label })
  ] }, label)) });
}
Dots.propTypes = {
  activeStep: import_prop_types.number,
  labels: (0, import_prop_types.arrayOf)(import_prop_types.string),
  secondary: import_prop_types.bool
};
var Dots_default = Dots;
