import { r as reactExports, bl as generateUtilityClasses, bk as generateUtilityClass, bn as _objectWithoutPropertiesLoose, cI as resolveProps, bo as _extends, bm as useDefaultProps, j as jsxRuntimeExports, y as styled, bb as clsx, bp as capitalize, bq as composeClasses, cJ as ButtonBase, cK as alpha, aj as requireInteropRequireDefault, ak as requireCreateSvgIcon, al as requireJsxRuntime, am as getDefaultExportFromCjs, u as useAtomValue, z as currentTheme, G as Grid, T as Tooltip, I as IconButton, cL as TodayIcon, d as Box, cM as NavigateNextIcon } from "./index-D15x63tD.js";
function getValidReactChildren(children) {
  return reactExports.Children.toArray(children).filter((child) => /* @__PURE__ */ reactExports.isValidElement(child));
}
function getToggleButtonUtilityClass(slot) {
  return generateUtilityClass("MuiToggleButton", slot);
}
const toggleButtonClasses = generateUtilityClasses("MuiToggleButton", ["root", "disabled", "selected", "standard", "primary", "secondary", "sizeSmall", "sizeMedium", "sizeLarge", "fullWidth"]);
const ToggleButtonGroupContext = /* @__PURE__ */ reactExports.createContext({});
const ToggleButtonGroupButtonContext = /* @__PURE__ */ reactExports.createContext(void 0);
function isValueSelected(value, candidate) {
  if (candidate === void 0 || value === void 0) {
    return false;
  }
  if (Array.isArray(candidate)) {
    return candidate.indexOf(value) >= 0;
  }
  return value === candidate;
}
const _excluded$1 = ["value"], _excluded2 = ["children", "className", "color", "disabled", "disableFocusRipple", "fullWidth", "onChange", "onClick", "selected", "size", "value"];
const useUtilityClasses$1 = (ownerState) => {
  const {
    classes,
    fullWidth,
    selected,
    disabled,
    size,
    color
  } = ownerState;
  const slots = {
    root: ["root", selected && "selected", disabled && "disabled", fullWidth && "fullWidth", `size${capitalize(size)}`, color]
  };
  return composeClasses(slots, getToggleButtonUtilityClass, classes);
};
const ToggleButtonRoot = styled(ButtonBase, {
  name: "MuiToggleButton",
  slot: "Root",
  overridesResolver: (props, styles) => {
    const {
      ownerState
    } = props;
    return [styles.root, styles[`size${capitalize(ownerState.size)}`]];
  }
})(({
  theme,
  ownerState
}) => {
  let selectedColor = ownerState.color === "standard" ? theme.palette.text.primary : theme.palette[ownerState.color].main;
  let selectedColorChannel;
  if (theme.vars) {
    selectedColor = ownerState.color === "standard" ? theme.vars.palette.text.primary : theme.vars.palette[ownerState.color].main;
    selectedColorChannel = ownerState.color === "standard" ? theme.vars.palette.text.primaryChannel : theme.vars.palette[ownerState.color].mainChannel;
  }
  return _extends({}, theme.typography.button, {
    borderRadius: (theme.vars || theme).shape.borderRadius,
    padding: 11,
    border: `1px solid ${(theme.vars || theme).palette.divider}`,
    color: (theme.vars || theme).palette.action.active
  }, ownerState.fullWidth && {
    width: "100%"
  }, {
    [`&.${toggleButtonClasses.disabled}`]: {
      color: (theme.vars || theme).palette.action.disabled,
      border: `1px solid ${(theme.vars || theme).palette.action.disabledBackground}`
    },
    "&:hover": {
      textDecoration: "none",
      // Reset on mouse devices
      backgroundColor: theme.vars ? `rgba(${theme.vars.palette.text.primaryChannel} / ${theme.vars.palette.action.hoverOpacity})` : alpha(theme.palette.text.primary, theme.palette.action.hoverOpacity),
      "@media (hover: none)": {
        backgroundColor: "transparent"
      }
    },
    [`&.${toggleButtonClasses.selected}`]: {
      color: selectedColor,
      backgroundColor: theme.vars ? `rgba(${selectedColorChannel} / ${theme.vars.palette.action.selectedOpacity})` : alpha(selectedColor, theme.palette.action.selectedOpacity),
      "&:hover": {
        backgroundColor: theme.vars ? `rgba(${selectedColorChannel} / calc(${theme.vars.palette.action.selectedOpacity} + ${theme.vars.palette.action.hoverOpacity}))` : alpha(selectedColor, theme.palette.action.selectedOpacity + theme.palette.action.hoverOpacity),
        // Reset on touch devices, it doesn't add specificity
        "@media (hover: none)": {
          backgroundColor: theme.vars ? `rgba(${selectedColorChannel} / ${theme.vars.palette.action.selectedOpacity})` : alpha(selectedColor, theme.palette.action.selectedOpacity)
        }
      }
    }
  }, ownerState.size === "small" && {
    padding: 7,
    fontSize: theme.typography.pxToRem(13)
  }, ownerState.size === "large" && {
    padding: 15,
    fontSize: theme.typography.pxToRem(15)
  });
});
const ToggleButton = /* @__PURE__ */ reactExports.forwardRef(function ToggleButton2(inProps, ref) {
  const _React$useContext = reactExports.useContext(ToggleButtonGroupContext), {
    value: contextValue
  } = _React$useContext, contextProps = _objectWithoutPropertiesLoose(_React$useContext, _excluded$1);
  const toggleButtonGroupButtonContextPositionClassName = reactExports.useContext(ToggleButtonGroupButtonContext);
  const resolvedProps = resolveProps(_extends({}, contextProps, {
    selected: isValueSelected(inProps.value, contextValue)
  }), inProps);
  const props = useDefaultProps({
    props: resolvedProps,
    name: "MuiToggleButton"
  });
  const {
    children,
    className,
    color = "standard",
    disabled = false,
    disableFocusRipple = false,
    fullWidth = false,
    onChange,
    onClick,
    selected,
    size = "medium",
    value
  } = props, other = _objectWithoutPropertiesLoose(props, _excluded2);
  const ownerState = _extends({}, props, {
    color,
    disabled,
    disableFocusRipple,
    fullWidth,
    size
  });
  const classes = useUtilityClasses$1(ownerState);
  const handleChange = (event) => {
    if (onClick) {
      onClick(event, value);
      if (event.defaultPrevented) {
        return;
      }
    }
    if (onChange) {
      onChange(event, value);
    }
  };
  const positionClassName = toggleButtonGroupButtonContextPositionClassName || "";
  return /* @__PURE__ */ jsxRuntimeExports.jsx(ToggleButtonRoot, _extends({
    className: clsx(contextProps.className, classes.root, className, positionClassName),
    disabled,
    focusRipple: !disableFocusRipple,
    ref,
    onClick: handleChange,
    onChange,
    value,
    ownerState,
    "aria-pressed": selected
  }, other, {
    children
  }));
});
function getToggleButtonGroupUtilityClass(slot) {
  return generateUtilityClass("MuiToggleButtonGroup", slot);
}
const toggleButtonGroupClasses = generateUtilityClasses("MuiToggleButtonGroup", ["root", "selected", "horizontal", "vertical", "disabled", "grouped", "groupedHorizontal", "groupedVertical", "fullWidth", "firstButton", "lastButton", "middleButton"]);
const _excluded = ["children", "className", "color", "disabled", "exclusive", "fullWidth", "onChange", "orientation", "size", "value"];
const useUtilityClasses = (ownerState) => {
  const {
    classes,
    orientation,
    fullWidth,
    disabled
  } = ownerState;
  const slots = {
    root: ["root", orientation === "vertical" && "vertical", fullWidth && "fullWidth"],
    grouped: ["grouped", `grouped${capitalize(orientation)}`, disabled && "disabled"],
    firstButton: ["firstButton"],
    lastButton: ["lastButton"],
    middleButton: ["middleButton"]
  };
  return composeClasses(slots, getToggleButtonGroupUtilityClass, classes);
};
const ToggleButtonGroupRoot = styled("div", {
  name: "MuiToggleButtonGroup",
  slot: "Root",
  overridesResolver: (props, styles) => {
    const {
      ownerState
    } = props;
    return [{
      [`& .${toggleButtonGroupClasses.grouped}`]: styles.grouped
    }, {
      [`& .${toggleButtonGroupClasses.grouped}`]: styles[`grouped${capitalize(ownerState.orientation)}`]
    }, {
      [`& .${toggleButtonGroupClasses.firstButton}`]: styles.firstButton
    }, {
      [`& .${toggleButtonGroupClasses.lastButton}`]: styles.lastButton
    }, {
      [`& .${toggleButtonGroupClasses.middleButton}`]: styles.middleButton
    }, styles.root, ownerState.orientation === "vertical" && styles.vertical, ownerState.fullWidth && styles.fullWidth];
  }
})(({
  ownerState,
  theme
}) => _extends({
  display: "inline-flex",
  borderRadius: (theme.vars || theme).shape.borderRadius
}, ownerState.orientation === "vertical" && {
  flexDirection: "column"
}, ownerState.fullWidth && {
  width: "100%"
}, {
  [`& .${toggleButtonGroupClasses.grouped}`]: _extends({}, ownerState.orientation === "horizontal" ? {
    [`&.${toggleButtonGroupClasses.selected} + .${toggleButtonGroupClasses.grouped}.${toggleButtonGroupClasses.selected}`]: {
      borderLeft: 0,
      marginLeft: 0
    }
  } : {
    [`&.${toggleButtonGroupClasses.selected} + .${toggleButtonGroupClasses.grouped}.${toggleButtonGroupClasses.selected}`]: {
      borderTop: 0,
      marginTop: 0
    }
  })
}, ownerState.orientation === "horizontal" ? {
  [`& .${toggleButtonGroupClasses.firstButton},& .${toggleButtonGroupClasses.middleButton}`]: {
    borderTopRightRadius: 0,
    borderBottomRightRadius: 0
  },
  [`& .${toggleButtonGroupClasses.lastButton},& .${toggleButtonGroupClasses.middleButton}`]: {
    marginLeft: -1,
    borderLeft: "1px solid transparent",
    borderTopLeftRadius: 0,
    borderBottomLeftRadius: 0
  }
} : {
  [`& .${toggleButtonGroupClasses.firstButton},& .${toggleButtonGroupClasses.middleButton}`]: {
    borderBottomLeftRadius: 0,
    borderBottomRightRadius: 0
  },
  [`& .${toggleButtonGroupClasses.lastButton},& .${toggleButtonGroupClasses.middleButton}`]: {
    marginTop: -1,
    borderTop: "1px solid transparent",
    borderTopLeftRadius: 0,
    borderTopRightRadius: 0
  }
}, ownerState.orientation === "horizontal" ? {
  [`& .${toggleButtonGroupClasses.lastButton}.${toggleButtonClasses.disabled},& .${toggleButtonGroupClasses.middleButton}.${toggleButtonClasses.disabled}`]: {
    borderLeft: "1px solid transparent"
  }
} : {
  [`& .${toggleButtonGroupClasses.lastButton}.${toggleButtonClasses.disabled},& .${toggleButtonGroupClasses.middleButton}.${toggleButtonClasses.disabled}`]: {
    borderTop: "1px solid transparent"
  }
}));
const ToggleButtonGroup = /* @__PURE__ */ reactExports.forwardRef(function ToggleButtonGroup2(inProps, ref) {
  const props = useDefaultProps({
    props: inProps,
    name: "MuiToggleButtonGroup"
  });
  const {
    children,
    className,
    color = "standard",
    disabled = false,
    exclusive = false,
    fullWidth = false,
    onChange,
    orientation = "horizontal",
    size = "medium",
    value
  } = props, other = _objectWithoutPropertiesLoose(props, _excluded);
  const ownerState = _extends({}, props, {
    disabled,
    fullWidth,
    orientation,
    size
  });
  const classes = useUtilityClasses(ownerState);
  const handleChange = reactExports.useCallback((event, buttonValue) => {
    if (!onChange) {
      return;
    }
    const index = value && value.indexOf(buttonValue);
    let newValue;
    if (value && index >= 0) {
      newValue = value.slice();
      newValue.splice(index, 1);
    } else {
      newValue = value ? value.concat(buttonValue) : [buttonValue];
    }
    onChange(event, newValue);
  }, [onChange, value]);
  const handleExclusiveChange = reactExports.useCallback((event, buttonValue) => {
    if (!onChange) {
      return;
    }
    onChange(event, value === buttonValue ? null : buttonValue);
  }, [onChange, value]);
  const context = reactExports.useMemo(() => ({
    className: classes.grouped,
    onChange: exclusive ? handleExclusiveChange : handleChange,
    value,
    size,
    fullWidth,
    color,
    disabled
  }), [classes.grouped, exclusive, handleExclusiveChange, handleChange, value, size, fullWidth, color, disabled]);
  const validChildren = getValidReactChildren(children);
  const childrenCount = validChildren.length;
  const getButtonPositionClassName = (index) => {
    const isFirstButton = index === 0;
    const isLastButton = index === childrenCount - 1;
    if (isFirstButton && isLastButton) {
      return "";
    }
    if (isFirstButton) {
      return classes.firstButton;
    }
    if (isLastButton) {
      return classes.lastButton;
    }
    return classes.middleButton;
  };
  return /* @__PURE__ */ jsxRuntimeExports.jsx(ToggleButtonGroupRoot, _extends({
    role: "group",
    className: clsx(classes.root, className),
    ref,
    ownerState
  }, other, {
    children: /* @__PURE__ */ jsxRuntimeExports.jsx(ToggleButtonGroupContext.Provider, {
      value: context,
      children: validChildren.map((child, index) => {
        return /* @__PURE__ */ jsxRuntimeExports.jsx(ToggleButtonGroupButtonContext.Provider, {
          value: getButtonPositionClassName(index),
          children: child
        }, index);
      })
    })
  }));
});
var ArrowCircleLeftOutlined = {};
var hasRequiredArrowCircleLeftOutlined;
function requireArrowCircleLeftOutlined() {
  if (hasRequiredArrowCircleLeftOutlined) return ArrowCircleLeftOutlined;
  hasRequiredArrowCircleLeftOutlined = 1;
  var _interopRequireDefault = requireInteropRequireDefault();
  Object.defineProperty(ArrowCircleLeftOutlined, "__esModule", {
    value: true
  });
  ArrowCircleLeftOutlined.default = void 0;
  var _createSvgIcon = _interopRequireDefault(/* @__PURE__ */ requireCreateSvgIcon());
  var _jsxRuntime = requireJsxRuntime();
  ArrowCircleLeftOutlined.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", {
    d: "M2 12c0 5.52 4.48 10 10 10s10-4.48 10-10S17.52 2 12 2 2 6.48 2 12m18 0c0 4.42-3.58 8-8 8s-8-3.58-8-8 3.58-8 8-8 8 3.58 8 8M8 12l4-4 1.41 1.41L11.83 11H16v2h-4.17l1.59 1.59L12 16z"
  }), "ArrowCircleLeftOutlined");
  return ArrowCircleLeftOutlined;
}
var ArrowCircleLeftOutlinedExports = /* @__PURE__ */ requireArrowCircleLeftOutlined();
const ArrowCircleLeftOutlinedIcon = /* @__PURE__ */ getDefaultExportFromCjs(ArrowCircleLeftOutlinedExports);
var ArrowCircleRightOutlined = {};
var hasRequiredArrowCircleRightOutlined;
function requireArrowCircleRightOutlined() {
  if (hasRequiredArrowCircleRightOutlined) return ArrowCircleRightOutlined;
  hasRequiredArrowCircleRightOutlined = 1;
  var _interopRequireDefault = requireInteropRequireDefault();
  Object.defineProperty(ArrowCircleRightOutlined, "__esModule", {
    value: true
  });
  ArrowCircleRightOutlined.default = void 0;
  var _createSvgIcon = _interopRequireDefault(/* @__PURE__ */ requireCreateSvgIcon());
  var _jsxRuntime = requireJsxRuntime();
  ArrowCircleRightOutlined.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", {
    d: "M22 12c0-5.52-4.48-10-10-10S2 6.48 2 12s4.48 10 10 10 10-4.48 10-10M4 12c0-4.42 3.58-8 8-8s8 3.58 8 8-3.58 8-8 8-8-3.58-8-8m12 0-4 4-1.41-1.41L12.17 13H8v-2h4.17l-1.59-1.59L12 8z"
  }), "ArrowCircleRightOutlined");
  return ArrowCircleRightOutlined;
}
var ArrowCircleRightOutlinedExports = /* @__PURE__ */ requireArrowCircleRightOutlined();
const ArrowCircleRightOutlinedIcon = /* @__PURE__ */ getDefaultExportFromCjs(ArrowCircleRightOutlinedExports);
var NavigateBefore = {};
var hasRequiredNavigateBefore;
function requireNavigateBefore() {
  if (hasRequiredNavigateBefore) return NavigateBefore;
  hasRequiredNavigateBefore = 1;
  var _interopRequireDefault = requireInteropRequireDefault();
  Object.defineProperty(NavigateBefore, "__esModule", {
    value: true
  });
  NavigateBefore.default = void 0;
  var _createSvgIcon = _interopRequireDefault(/* @__PURE__ */ requireCreateSvgIcon());
  var _jsxRuntime = requireJsxRuntime();
  NavigateBefore.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", {
    d: "M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z"
  }), "NavigateBefore");
  return NavigateBefore;
}
var NavigateBeforeExports = /* @__PURE__ */ requireNavigateBefore();
const NavigateBeforeIcon = /* @__PURE__ */ getDefaultExportFromCjs(NavigateBeforeExports);
const months = ["янв.", "фев.", "март", "апр.", "май", "июнь", "июль", "авг.", "сен.", "окт.", "ноя.", "дек."];
function MonthYearPicker(props) {
  var _a, _b, _c, _d;
  const theme = useAtomValue(currentTheme);
  const [selectedMonth, setSelectedMonth] = reactExports.useState(
    ((_a = props.value) == null ? void 0 : _a.month) || ((/* @__PURE__ */ new Date()).getMonth() + 1).toString()
  );
  const selectedMonthRef = reactExports.useRef(((_b = props.value) == null ? void 0 : _b.month) || ((/* @__PURE__ */ new Date()).getMonth() + 1).toString());
  const [selectedYear, setSelectedYear] = reactExports.useState(((_c = props.value) == null ? void 0 : _c.year) || (/* @__PURE__ */ new Date()).getFullYear().toString());
  const carouselRef = reactExports.useRef(null);
  const [hideCarouselButtons, setHideCarouselButtons] = reactExports.useState(true);
  const [timerResizeObserver, setTimerResizeObserver] = reactExports.useState(void 0);
  const [carouselTransform, setCarouselTransform] = reactExports.useState(0);
  const [disabledArrowRight, setDisabledArrowRight] = reactExports.useState(false);
  const currentYear = ((_d = props.todayValue) == null ? void 0 : _d.year) || (/* @__PURE__ */ new Date()).getFullYear().toString();
  function handleResize() {
    clearTimeout(timerResizeObserver);
    setTimerResizeObserver(
      setTimeout(() => {
        if (carouselRef.current && carouselRef.current.offsetWidth !== 0) {
          if (carouselRef.current.offsetWidth < 529) {
            const newTransform = (Math.trunc(carouselRef.current.offsetWidth / 44) - Number(selectedMonthRef.current)) * 44;
            setCarouselTransform(Math.min(Math.max(newTransform, carouselRef.current.offsetWidth - 529), 0));
            if (carouselRef.current.offsetWidth - 529 > newTransform) setDisabledArrowRight(true);
            setHideCarouselButtons(false);
          } else {
            setCarouselTransform(0);
            setDisabledArrowRight(false);
            setHideCarouselButtons(true);
          }
        }
      }, 251)
    );
  }
  reactExports.useEffect(() => {
    const resizeObserver = new ResizeObserver(handleResize);
    if (carouselRef.current) resizeObserver.observe(carouselRef.current);
    return () => {
      if (carouselRef.current) resizeObserver.unobserve(carouselRef.current);
      resizeObserver.disconnect();
    };
  }, []);
  reactExports.useEffect(() => {
    if (props.value) {
      setSelectedMonth(props.value.month);
      selectedMonthRef.current = props.value.month;
      setSelectedYear(props.value.year);
    }
  }, [props.value]);
  function handleYearChange(increment) {
    var _a2;
    const newYear = (Number(selectedYear) + (increment ? 1 : -1)).toString();
    let newMonth = selectedMonth;
    if (increment && selectedMonth === "12") {
      newMonth = "1";
    } else if (!increment && selectedMonth === "1") {
      newMonth = "12";
    }
    if (props.value === void 0) {
      setSelectedYear(newYear);
      setSelectedMonth(newMonth);
    }
    (_a2 = props.onChange) == null ? void 0 : _a2.call(props, { year: newYear, month: newMonth });
  }
  function handleMonth(event, newMonth) {
    var _a2;
    if (newMonth !== null) {
      if (props.value === void 0) {
        setSelectedMonth(newMonth);
        selectedMonthRef.current = newMonth;
      }
      (_a2 = props.onChange) == null ? void 0 : _a2.call(props, { year: selectedYear, month: newMonth });
    }
  }
  function handleToday() {
    var _a2;
    let newValue;
    if (props.todayValue) {
      newValue = props.todayValue;
    } else {
      const today = /* @__PURE__ */ new Date();
      newValue = { year: today.getFullYear().toString(), month: (today.getMonth() + 1).toString() };
    }
    if (props.value === void 0) {
      setSelectedYear(newValue.year);
      setSelectedMonth(newValue.month);
      selectedMonthRef.current = newValue.month;
    }
    (_a2 = props.onChange) == null ? void 0 : _a2.call(props, newValue);
  }
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(
    Grid,
    {
      className: clsx("backgroundColorStimate", { light: theme === "light" }),
      style: {
        display: "flex",
        width: "calc(100% - 1px)",
        border: "1px solid #cccccc"
      },
      children: [
        /* @__PURE__ */ jsxRuntimeExports.jsx(
          Tooltip,
          {
            title: "Установить текущий период",
            disableHoverListener: props.tooltipOff,
            disableTouchListener: props.tooltipOff,
            children: /* @__PURE__ */ jsxRuntimeExports.jsx(IconButton, { className: clsx("iconButtonStimate", { light: theme === "light" }), onClick: handleToday, children: /* @__PURE__ */ jsxRuntimeExports.jsx(TodayIcon, { fontSize: "small" }) })
          }
        ),
        /* @__PURE__ */ jsxRuntimeExports.jsxs(
          Box,
          {
            display: "flex",
            alignItems: "center",
            width: "calc(100% - 36px)",
            justifyContent: "space-between",
            overflow: "hidden",
            children: [
              /* @__PURE__ */ jsxRuntimeExports.jsxs(Grid, { style: { overflow: "hidden", display: "flex", alignItems: "center" }, children: [
                /* @__PURE__ */ jsxRuntimeExports.jsx(
                  IconButton,
                  {
                    className: clsx("iconButtonStimate", { light: theme === "light" }),
                    style: { display: hideCarouselButtons ? "none" : "" },
                    disabled: carouselTransform === 0,
                    onClick: () => {
                      setDisabledArrowRight(false);
                      setCarouselTransform(Math.min(0, carouselTransform + 44));
                    },
                    children: /* @__PURE__ */ jsxRuntimeExports.jsx(ArrowCircleLeftOutlinedIcon, { fontSize: "small" })
                  }
                ),
                /* @__PURE__ */ jsxRuntimeExports.jsx(Grid, { style: { overflow: "hidden", display: "flex", alignItems: "center" }, ref: carouselRef, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
                  ToggleButtonGroup,
                  {
                    size: "small",
                    value: selectedMonth,
                    onChange: handleMonth,
                    exclusive: true,
                    style: { height: "30px", transform: `translateX(${carouselTransform}px)` },
                    children: months.map((item, index) => {
                      return /* @__PURE__ */ jsxRuntimeExports.jsx(
                        ToggleButton,
                        {
                          value: (index + 1).toString(),
                          style: { textTransform: "none", minWidth: "45px", width: "45px" },
                          children: item
                        },
                        index
                      );
                    })
                  }
                ) }),
                /* @__PURE__ */ jsxRuntimeExports.jsx(
                  IconButton,
                  {
                    className: clsx("iconButtonStimate", { light: theme === "light" }),
                    style: { display: hideCarouselButtons ? "none" : "" },
                    disabled: disabledArrowRight,
                    onClick: () => {
                      const newTransform = carouselTransform - 44;
                      if (carouselRef.current) {
                        if (carouselRef.current.offsetWidth - 529 > newTransform) setDisabledArrowRight(true);
                        setCarouselTransform(Math.max(carouselRef.current.offsetWidth - 529, newTransform));
                      }
                    },
                    children: /* @__PURE__ */ jsxRuntimeExports.jsx(ArrowCircleRightOutlinedIcon, { fontSize: "small" })
                  }
                )
              ] }),
              /* @__PURE__ */ jsxRuntimeExports.jsxs(Grid, { display: "flex", alignItems: "center", height: "30px", children: [
                /* @__PURE__ */ jsxRuntimeExports.jsx(
                  Tooltip,
                  {
                    title: "Предыдущий год",
                    disableHoverListener: props.tooltipOff,
                    disableTouchListener: props.tooltipOff,
                    children: /* @__PURE__ */ jsxRuntimeExports.jsx(
                      IconButton,
                      {
                        className: clsx("iconButtonStimate", { light: theme === "light" }),
                        onClick: () => handleYearChange(false),
                        children: /* @__PURE__ */ jsxRuntimeExports.jsx(NavigateBeforeIcon, { fontSize: "small" })
                      }
                    )
                  }
                ),
                /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { fontWeight: currentYear === selectedYear ? "bolder" : "" }, children: selectedYear }),
                /* @__PURE__ */ jsxRuntimeExports.jsx(
                  Tooltip,
                  {
                    title: "Следующий год",
                    disableHoverListener: props.tooltipOff,
                    disableTouchListener: props.tooltipOff,
                    children: /* @__PURE__ */ jsxRuntimeExports.jsx(
                      IconButton,
                      {
                        className: clsx("iconButtonStimate", { light: theme === "light" }),
                        onClick: () => handleYearChange(true),
                        children: /* @__PURE__ */ jsxRuntimeExports.jsx(NavigateNextIcon, { fontSize: "small" })
                      }
                    )
                  }
                )
              ] })
            ]
          }
        )
      ]
    }
  );
}
export {
  MonthYearPicker as M
};
//# sourceMappingURL=MonthYearPicker-CnPllbI6.js.map
