"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
var _styledComponents = _interopRequireDefault(require("styled-components"));
var _utils = require("../utils");
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var TrackHighlight = _styledComponents.default.div.withConfig({
  displayName: "SliderTrackHighlight__TrackHighlight",
  componentId: "sc-p47ej5-0"
})(["background:", ";border-radius:inherit;height:", ";position:absolute;width:100%;"], function (p) {
  var getBackgroundColor = function getBackgroundColor() {
    if (p.$disabled) {
      return p.theme.color.sliderDisabled;
    }
    if (p.$sliderColor) {
      return p.$sliderColor(p.theme);
    }
    return p.theme.color.sliderColor;
  };
  return getBackgroundColor();
}, function (p) {
  return "".concat((0, _utils.getHeight)(p.$variant), "px");
});
var SliderTrackHighlight = function SliderTrackHighlight(_ref) {
  var disabled = _ref.disabled,
    sliderColor = _ref.sliderColor,
    _ref$startValue = _ref.startValue,
    startValue = _ref$startValue === void 0 ? 0 : _ref$startValue,
    value = _ref.value,
    variant = _ref.variant;
  return _react.default.createElement(TrackHighlight, {
    $disabled: disabled,
    $sliderColor: sliderColor,
    $variant: variant,
    style: {
      left: "".concat(startValue, "%"),
      width: "".concat(value - startValue, "%")
    }
  });
};
var _default = exports.default = SliderTrackHighlight;