"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.useReactSliderProps = void 0;
const react_1 = __importDefault(require("react"));
const useReactSliderProps = (filter, filterValue, filterRange, handleChange) => {
    const reactSliderProps = react_1.default.useMemo(() => {
        var _a;
        return {
            value: [
                filterValue[0] ? filterValue[0] : filterRange[0],
                filterValue[1] ? filterValue[1] : filterRange[1],
            ],
            defaultValue: [filterRange[0], filterRange[1]],
            min: filterRange[0],
            max: filterRange[1],
            step: parseInt((_a = filter.displaySliderStep) !== null && _a !== void 0 ? _a : "5"),
            pearling: true,
            minDistance: 0,
            onChange: (value) => Array.isArray(value) ? handleChange([value[0], value[1]]) : {},
        };
    }, [filter.displaySliderStep, filterValue, filterRange, handleChange]);
    return reactSliderProps;
};
exports.useReactSliderProps = useReactSliderProps;
//# sourceMappingURL=useReactSliderProps.js.map