import _extends from "@babel/runtime/helpers/extends";
// Copyright 1999-2020. Plesk International GmbH. All rights reserved.
import React from 'react';
import classNames from 'classnames';
import { CLS_PREFIX } from '../../constants';

const ProgressIndicator = ({
  baseClassName = `${CLS_PREFIX}progress-bar__indicator`,
  className,
  intent,
  progress = -1,
  ...props
}) => /*#__PURE__*/React.createElement("div", _extends({
  className: classNames(baseClassName, {
    [`${baseClassName}--${intent}`]: intent,
    [`${baseClassName}--indeterminate`]: progress === -1
  }, className),
  style: progress >= 0 && progress <= 100 ? {
    width: `${progress}%`
  } : undefined
}, props));

export default ProgressIndicator;