import { useState } from "react";
import "./CalcRangeSlider.css";

interface CalcRangeSliderProps {
  defaultValue: number;
  min: number;
  max: number;
  handleChange?: (value: number) => void;
}

function CalcRangeSlider({ defaultValue, min, max }: CalcRangeSliderProps) {
  const [value, setvalue] = useState<number>(defaultValue);

  return (
    <input
      type="range"
      min={min}
      max={max}
      className="transition-all w-full h-0.5 bg-[#798FFF] range-slider"
      value={value}
      onChange={(e) => setvalue(+e.target.value)}
    />
  );
}

export default CalcRangeSlider;
