"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;

var _react = _interopRequireDefault(require("react"));

var _reactNative = require("react-native");

var _theme = require("../../../theme");

var _index = require("./index");

var _native = _interopRequireDefault(require("styled-components/native"));

var _styledSystem = require("styled-system");

var _v = require("@native-base/v3");

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

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); }

const NBSliderThumb = ({
  children,
  ...props
}) => {
  const theme = _react.default.useContext(_theme.ThemeContext);

  const {
    sliderOffset,
    panResponder
  } = _react.default.useContext(_index.SliderContext);

  const customStyle = _reactNative.StyleSheet.create({
    SliderThumb: {
      position: 'absolute',
      display: 'flex',
      left: sliderOffset,
      justifyContent: 'center',
      alignItems: 'center'
    }
  });

  return /*#__PURE__*/_react.default.createElement(_reactNative.Animated.View, _extends({
    style: customStyle.SliderThumb
  }, panResponder.panHandlers), /*#__PURE__*/_react.default.createElement(_v.Box, _extends({
    position: "relative",
    borderRadius: theme.radii.full,
    backgroundColor: theme.colors.white,
    shadow: 1 // minHeight={theme.sizes[5]}
    // maxHeight={theme.sizes[5]}
    // maxWidth={theme.sizes[5]}
    // minWidth={theme.sizes[5]}
    ,
    height: theme.sizes[5],
    width: theme.sizes[5],
    display: "flex",
    justifyContent: "center",
    alignItems: "center"
  }, props), children));
};

const StyledSlider = (0, _native.default)(NBSliderThumb)(_styledSystem.space, _styledSystem.color, _styledSystem.layout, _styledSystem.typography);
StyledSlider.defaultProps = {};

const SliderThumb = ({ ...props
}) => {
  return /*#__PURE__*/_react.default.createElement(StyledSlider, props);
};

var _default = SliderThumb;
exports.default = _default;
//# sourceMappingURL=SliderThumb.js.map