import Slider from "@react-native-community/slider";
import { useContext } from "react";
import { AppContext } from "../../utils";

export default function MySlider({
  style,
  value,
  onValueChange,
  minimumValue,
  maximumValue,
  inverted,
  onSlidingComplete,
}) {
  const appContext = useContext(AppContext);

  return (
    <Slider
      style={style}
      minimumValue={minimumValue}
      maximumValue={maximumValue}
      value={value}
      inverted={inverted}
      onValueChange={onValueChange}
      minimumTrackTintColor={appContext.appTheme.slider.minimumTrackTintColor}
      maximumTrackTintColor={appContext.appTheme.slider.maximumTrackTintColor}
      thumbTintColor={appContext.appTheme.slider.thumbTintColor}
      step={1}
      onSlidingComplete={onSlidingComplete}
    />
  );
}
