"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
exports.__esModule = true;
exports.default = void 0;
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
var _react = _interopRequireDefault(require("react"));
var _system = require("@wix/wix-ui-icons-common/system");
var _LinearProgressBarSt = require("./LinearProgressBar.st.css.js");
var _LinearProgressBarCore = _interopRequireDefault(require("./LinearProgressBarCore"));
var _StatusIndicator = _interopRequireDefault(require("../StatusIndicator"));
var _LinearProgressBar = require("./LinearProgressBar.constants");
var _WixDesignSystemIconThemeProvider = require("../WixDesignSystemIconThemeProvider");
var _excluded = ["errorMessage", "skin", "light", "dataHook", "error", "padding"];
var _jsxFileName = "/home/builduser/work/57e038ea7326c1ec/packages/wix-design-system/dist/cjs/LinearProgressBar/LinearProgressBar.tsx";
var defaultSkin = 'standard';
function LinearProgressBar(_ref) {
  var {
      errorMessage,
      skin = defaultSkin,
      light,
      dataHook,
      error,
      padding
    } = _ref,
    otherProps = (0, _objectWithoutProperties2.default)(_ref, _excluded);
  var icons = (0, _WixDesignSystemIconThemeProvider.useIcons)('LinearProgressBar', {
    ToggleOn: _system.ToggleOn
  });
  return /*#__PURE__*/_react.default.createElement(_LinearProgressBarCore.default, (0, _extends2.default)({
    "data-hook": dataHook,
    className: (0, _LinearProgressBarSt.st)(_LinearProgressBarSt.classes.root, {
      light,
      skin,
      padding
    }),
    "data-skin": skin,
    "data-padding": padding
  }, otherProps, {
    error: error,
    successIcon: /*#__PURE__*/_react.default.createElement(icons.ToggleOn, {
      __self: this,
      __source: {
        fileName: _jsxFileName,
        lineNumber: 47,
        columnNumber: 20
      }
    }),
    errorIcon: /*#__PURE__*/_react.default.createElement(_StatusIndicator.default, {
      dataHook: _LinearProgressBar.dataHooks.errorIcon,
      status: "error",
      message: errorMessage,
      __self: this,
      __source: {
        fileName: _jsxFileName,
        lineNumber: 49,
        columnNumber: 9
      }
    }),
    __self: this,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 40,
      columnNumber: 5
    }
  }));
}
LinearProgressBar.displayName = 'LinearProgressBar';
var _default = exports.default = LinearProgressBar;
//# sourceMappingURL=LinearProgressBar.js.map