"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("../../Slider/utils");
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var HoverArea = _styledComponents.default.div.withConfig({
  displayName: "RangeSliderTrack__HoverArea",
  componentId: "sc-1tnkune-0"
})(["position:relative;width:100%;height:", ";cursor:", ";padding:", ";"], function (p) {
  return "".concat((0, _utils.getHeight)(p.$variant), "px");
}, function (p) {
  return p.$disabled ? 'not-allowed' : 'pointer';
}, function (p) {
  return "".concat(p.theme.spacing.unit(2), "px 0");
});
var Track = _styledComponents.default.div.withConfig({
  displayName: "RangeSliderTrack__Track",
  componentId: "sc-1tnkune-1"
})(["position:relative;width:100%;height:", ";background:", ";border-radius:", ";cursor:", ";"], function (p) {
  return "".concat((0, _utils.getHeight)(p.$variant), "px");
}, function (p) {
  return p.theme.colorTokens.neutral.background_skeleton;
}, function (p) {
  return "".concat((0, _utils.getKnobSize)(p.$variant), "px");
}, function (p) {
  return p.$disabled ? 'not-allowed' : 'pointer';
});
var RangeSliderTrack = function RangeSliderTrack(_ref) {
  var children = _ref.children,
    disabled = _ref.disabled,
    variant = _ref.variant,
    readOnly = _ref.readOnly,
    sliderColor = _ref.sliderColor,
    onMouseDown = _ref.onMouseDown,
    onMouseLeave = _ref.onMouseLeave,
    onMouseMove = _ref.onMouseMove,
    onMouseUp = _ref.onMouseUp,
    onTouchStart = _ref.onTouchStart;
  return _react.default.createElement(HoverArea, {
    $disabled: disabled || readOnly,
    onMouseDown: onMouseDown,
    onMouseLeave: onMouseLeave,
    onMouseMove: onMouseMove,
    onMouseUp: onMouseUp,
    onTouchStart: onTouchStart,
    $sliderColor: sliderColor,
    $variant: variant
  }, _react.default.createElement(Track, {
    $disabled: disabled || readOnly,
    $variant: variant
  }, children));
};
var _default = exports.default = RangeSliderTrack;