var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
    for (var name in all) __defProp(target, name, {
      get: all[name],
      enumerable: !0
    });
  },
  __copyProps = (to, from, except, desc) => {
    if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
      get: () => from[key],
      enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
    });
    return to;
  };
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
  value: !0
}), mod);
var MonthPickerButton_exports = {};
__export(MonthPickerButton_exports, {
  MonthPickerButton: () => MonthPickerButton
});
module.exports = __toCommonJS(MonthPickerButton_exports);
var import_icons_ui = require("@truststack/icons-ui"),
  import_react_native = require("react-native-web"),
  import_tamagui = require("tamagui"),
  import_DatePickerProvider = require("./DatePickerProvider.cjs"),
  import_Icon = require("./Icon.cjs"),
  import_MonthPicker = require("./MonthPicker.cjs"),
  import_jsx_runtime = require("react/jsx-runtime");
function MonthPickerButton({
  monthsCount,
  activeMonth,
  isFirst,
  isLast
}) {
  const {
    goToPreviousMonths,
    goToPreviousMonthsByOneMonth,
    goToNextMonthsByOneMonth,
    goToNextMonths
  } = (0, import_DatePickerProvider.useDatepickerContext)();
  return /* @__PURE__ */(0, import_jsx_runtime.jsxs)(import_tamagui.XStack, {
    width: "50%",
    alignItems: "center",
    justifyContent: "space-between",
    children: [/* @__PURE__ */(0, import_jsx_runtime.jsx)(import_react_native.Pressable, {
      onPress: monthsCount > 1 ? goToPreviousMonths : goToPreviousMonthsByOneMonth,
      disabled: !isFirst,
      children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_Icon.Icon, {
        icon: import_icons_ui.ChevronLeft
      })
    }), /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_MonthPicker.MonthPicker, {
      value: import_MonthPicker.MONTH[activeMonth.month],
      year: activeMonth.year
    }), /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_react_native.Pressable, {
      onPress: monthsCount > 1 ? goToNextMonths : goToNextMonthsByOneMonth,
      disabled: !isLast,
      children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_Icon.Icon, {
        icon: import_icons_ui.ChevronRight
      })
    })]
  });
}