import { a as __rest, _ as __assign } from '../tslib.es6-faad35dc.js';
import { jsx, jsxs } from 'react/jsx-runtime';
import { styled } from '@mui/material/styles';
import Slider, { SliderThumb } from '@mui/material/Slider';
import Icon from './Icon.js';
import '../icons/ArrowLeft.js';
import '../icons/ArrowRight.js';
import '../icons/CloseCircle.js';
import '../icons/InfoCircle.js';
import '../icons/ErrorCircle.js';
import '../icons/Attention.js';
import '../icons/HelpCircle.js';
import '../icons/Document.js';
import '../icons/DocumentText.js';
import '../icons/Lock.js';
import '../icons/Delete.js';
import '../icons/Users.js';
import '../icons/Stakefish.js';
import '../icons/Sound.js';
import '../icons/Beacon.js';
import '../icons/TriangleRight.js';
import '../icons/TriangleLeft.js';
import '../icons/TriangleUp.js';
import '../icons/TriangleDown.js';
import '../icons/Sent.js';
import '../icons/Download.js';
import '../icons/Faster.js';
import '../icons/Slower.js';
import '../icons/Usb.js';
import '../icons/Key.js';
import '../icons/Edit.js';
import '../icons/Expand.js';
import '../icons/Collapse.js';
import '../icons/Success.js';
import '../icons/SuccessCircle.js';
import '../icons/Fail.js';
import '../icons/Desktop.js';
import '../icons/Mobile.js';
import '../icons/Loading.js';
import '../icons/Upload.js';
import '../icons/Check.js';
import '../icons/ChevronLeft.js';
import '../icons/ChevronRight.js';
import '../icons/Plus.js';
import '../icons/Minus.js';
import '../icons/Globe.js';
import '../icons/Link.js';
import '../icons/Copy.js';
import '../icons/Medium.js';
import '../icons/Twitter.js';
import '../icons/Telegram.js';
import '../icons/Eth.js';
import '../icons/Sort.js';
import '../icons/Close.js';
import '../icons/DollarSign.js';
import '../icons/Search.js';
import '../icons/Range.js';
import '../icons/Instagram.js';
import '../icons/LinkedIn.js';
import '../icons/Reddit.js';
import '../icons/YouTube.js';
import '../icons/Chrome.js';
import '../icons/CloudConnect.js';
import '../icons/Update.js';
import '../icons/Menu.js';
import '../icons/Settings.js';

var StyledSlider = styled(Slider)(function (_a) {
    var theme = _a.theme, color = _a.color;
    return ({
        height: 8,
        width: "calc(100% - 75px)",
        padding: theme.spacing(5, 0),
        color: theme.palette.gray[900],
        "&.MuiSlider-colorSecondary": {
            color: theme.palette.primary.main,
            "& $thumb": {
                backgroundColor: theme.palette.gray.white
            }
        },
        "&.MuiSlider-colorPrimary": {
            color: theme.palette.gray[900],
            "& $thumb": {
                backgroundColor: theme.palette.primary.main
            }
        },
        "&.Mui-disabled": {
            color: theme.palette.gray[500],
            "& $thumb": {
                backgroundColor: theme.palette.gray[500]
            }
        },
        "& .MuiSlider-thumb": {
            height: 75,
            width: 75,
            marginLeft: 37.5,
            border: "3px solid",
            borderColor: theme.palette.text.primary,
            cursor: "ew-resize",
            "&, &:focus, &.Mui-active, &:hover": {
                boxShadow: "0 6px 17px 0 rgba(0, 0, 0, 0.14)"
            },
            "&:before": {
                display: "none"
            },
            "&.Mui-disabled": {
                height: 75,
                width: 75,
                marginLeft: 0
            },
            "& .icon": {
                color: color === "primary" ? theme.palette.primary.main : theme.palette.text.primary
            }
        },
        "& .MuiSlider-track": {
            height: 4,
            borderRadius: theme.borders.radius.md,
            opacity: 1,
            border: 0
        },
        "& .MuiSlider-rail": {
            height: 4,
            width: "calc(100% + 75px)",
            borderRadius: theme.borders.radius.md,
            opacity: 1
        }
    });
});
var ThumbComponent = function (_a) {
    var children = _a.children, props = __rest(_a, ["children"]);
    return (jsxs(SliderThumb, __assign({}, props, { children: [jsx(Icon, { iconKey: "range", size: "lg" }, void 0), children] }), void 0));
};
var RangeSlider = function (_a) {
    var disabled = _a.disabled, _b = _a.color, color = _b === void 0 ? "secondary" : _b, defaultValue = _a.defaultValue, props = __rest(_a, ["disabled", "color", "defaultValue"]);
    return (jsx(StyledSlider, __assign({ color: color, defaultValue: defaultValue, disabled: disabled, components: { Thumb: ThumbComponent } }, props), void 0));
};

export { RangeSlider as default };
