text: import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
  
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
  
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
  
  import React from 'react';
  
  var Track = function Track(props) {
    var _ref, _ref2;
  
    var className = props.className,
        included = props.included,
        vertical = props.vertical,
        style = props.style,
        onMouseDown = props.onMouseDown;
    var length = props.length,
        offset = props.offset,
        reverse = props.reverse;
  
    if (length < 0) {
      reverse = !reverse;
      length = Math.abs(length);
      offset = 100 - offset;
    }
  
    var positonStyle = vertical ? (_ref = {}, _defineProperty(_ref, reverse ? 'top' : 'bottom', "".concat(offset, "%")), _defineProperty(_ref, reverse ? 'bottom' : 'top', 'auto'), _defineProperty(_ref, "height", "".concat(length, "%")), _ref) : (_ref2 = {}, _defineProperty(_ref2, reverse ? 'right' : 'left', "".concat(offset, "%")), _defineProperty(_ref2, reverse ? 'left' : 'right', 'auto'), _defineProperty(_ref2, "width", "".concat(length, "%")), _ref2);
  
    var elStyle = _objectSpread(_objectSpread({}, style), positonStyle);
  
    return included ? React.createElement("div", {
      onMouseDown: onMouseDown,
      className: className,
      style: elStyle
    }) : null;
  };
  
  export default Track;