import { jsx, jsxs } from "react/jsx-runtime";
import React from "react";
import { bool, number } from "prop-types";
import styled from "styled-components";
const Wrapper = styled.View`
  position: relative;
`;
const InactiveLine = styled.View(
  ({
    theme: {
      yoga: {
        components: { stepper }
      }
    }
  }) => `
  width: 100%;
  height: 4px;

  position: absolute;
  top: 0;

  background-color: ${stepper.line.backgroundColor.inactive};
`
);
const ActiveLine = styled.View(
  ({
    width,
    secondary,
    theme: {
      yoga: {
        components: { stepper }
      }
    }
  }) => `
    position: absolute;
    top: 0;

    background-color: ${secondary ? stepper.line.backgroundColor.secondary : stepper.line.backgroundColor.active};
    width: ${width}%;
    height: 4px;
`
);
function Line({ activeStep = 0, totalSteps = 0, secondary = false }) {
  return /* @__PURE__ */ jsxs(Wrapper, { children: [
    /* @__PURE__ */ jsx(InactiveLine, {}),
    /* @__PURE__ */ jsx(
      ActiveLine,
      {
        width: activeStep <= 0 ? 0 : activeStep / totalSteps * 100,
        secondary
      }
    )
  ] });
}
Line.propTypes = {
  activeStep: number,
  totalSteps: number,
  secondary: bool
};
var Line_default = Line;
export {
  Line_default as default
};
