import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { ChevronLeft, ChevronRight } from "@truststack/icons-ui";
import { Pressable } from "react-native";
import { XStack } from "tamagui";
import { useDatepickerContext } from "./DatePickerProvider.native.js";
import { Icon } from "./Icon.native.js";
import { MONTH, MonthPicker } from "./MonthPicker.native.js";
function MonthPickerButton(param) {
  var {
      monthsCount,
      activeMonth,
      isFirst,
      isLast
    } = param,
    {
      goToPreviousMonths,
      goToPreviousMonthsByOneMonth,
      goToNextMonthsByOneMonth,
      goToNextMonths
    } = useDatepickerContext();
  return /* @__PURE__ */_jsxs(XStack, {
    width: "50%",
    alignItems: "center",
    justifyContent: "space-between",
    children: [/* @__PURE__ */_jsx(Pressable, {
      onPress: monthsCount > 1 ? goToPreviousMonths : goToPreviousMonthsByOneMonth,
      disabled: !isFirst,
      children: /* @__PURE__ */_jsx(Icon, {
        icon: ChevronLeft
      })
    }), /* @__PURE__ */_jsx(MonthPicker, {
      value: MONTH[activeMonth.month],
      year: activeMonth.year
    }), /* @__PURE__ */_jsx(Pressable, {
      onPress: monthsCount > 1 ? goToNextMonths : goToNextMonthsByOneMonth,
      disabled: !isLast,
      children: /* @__PURE__ */_jsx(Icon, {
        icon: ChevronRight
      })
    })]
  });
}
export { MonthPickerButton };
//# sourceMappingURL=MonthPickerButton.native.js.map
