'use strict';

var componentsTheming = require('@wise/components-theming');
var clsx = require('clsx');
var Body = require('../body/Body.js');
var Progress = require('../progress/Progress.js');
var Title = require('../title/Title.js');
var jsxRuntime = require('react/jsx-runtime');
var typography = require('../common/propsValues/typography.js');

const ProgressBar = ({
  className,
  description,
  id,
  title,
  progress,
  textEnd
}) => {
  const {
    isModern
  } = componentsTheming.useTheme();
  return /*#__PURE__*/jsxRuntime.jsxs("div", {
    className: clsx.clsx('np-progress-bar', className),
    children: [/*#__PURE__*/jsxRuntime.jsxs("label", {
      className: "np-progress-bar__title m-b-1",
      htmlFor: id,
      children: [/*#__PURE__*/jsxRuntime.jsx(Title, {
        type: typography.Typography.TITLE_BODY,
        className: isModern ? `m-b-1 text-primary` : `text-primary`,
        children: title
      }), description && /*#__PURE__*/jsxRuntime.jsx(Body, {
        children: description
      })]
    }), /*#__PURE__*/jsxRuntime.jsx(Progress, {
      id: id,
      progress: progress
    }), /*#__PURE__*/jsxRuntime.jsx(Body, {
      as: "p",
      type: typography.Typography.BODY_DEFAULT_BOLD,
      className: "d-flex justify-content-end text-primary m-b-0",
      children: textEnd
    })]
  });
};

module.exports = ProgressBar;
//# sourceMappingURL=ProgressBar.js.map
