function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }

import React from 'react';
import PropTypes from 'prop-types';

const Track = ({
  source,
  target,
  getTrackProps
}) => /*#__PURE__*/React.createElement("div", _extends({
  className: "form-field-slider__track",
  style: {
    left: `${source.percent}%`,
    width: `${target.percent - source.percent}%`
  } // eslint-disable-next-line react/jsx-props-no-spreading

}, getTrackProps()), /*#__PURE__*/React.createElement("div", {
  className: "form-field-slider__track-line"
}));

Track.propTypes = {
  source: PropTypes.object.isRequired,
  target: PropTypes.object.isRequired,
  getTrackProps: PropTypes.func.isRequired
};
export default Track;