"use strict";
require("react");
const index$1 = require("../../Button/index.js");
const shortcuts = require("./shortcuts.js");
const is = require("../../_util/is.js");
const index = require("../../Link/index.js");
const emotionReactJsxRuntime_browser_esm = require("../../../../../../../@emotion_react@11.10.4_3toe27fv7etiytxb5kxc7fxaw4/node_modules/@emotion/react/jsx-runtime/dist/emotion-react-jsx-runtime.browser.esm.js");
function Footer(props) {
  var showTime = props.showTime, prefixCls = props.prefixCls, DATEPICKER_LOCALE = props.DATEPICKER_LOCALE, disabled = props.disabled, onClickConfirmBtn = props.onClickConfirmBtn, onClickSelectTimeBtn = props.onClickSelectTimeBtn, isTimePanel = props.isTimePanel, onSelectNow = props.onSelectNow, showNowBtn = props.showNowBtn, shortcuts$1 = props.shortcuts, onMouseEnterShortcut = props.onMouseEnterShortcut, onMouseLeaveShortcut = props.onMouseLeaveShortcut, onSelectShortcut = props.onSelectShortcut, extra = props.extra, mode = props.mode, shortcutsPlacementLeft = props.shortcutsPlacementLeft;
  var hasShortcuts = is.isArray(shortcuts$1) && shortcuts$1.length > 0;
  var shouldShowNowBtn = showNowBtn && showTime && !hasShortcuts;
  var shouldShouldShortcuts = shouldShowNowBtn || hasShortcuts && !shortcutsPlacementLeft;
  return /* @__PURE__ */ emotionReactJsxRuntime_browser_esm.jsxs("div", {
    className: prefixCls + "-footer",
    children: [extra && /* @__PURE__ */ emotionReactJsxRuntime_browser_esm.jsx("div", {
      className: prefixCls + "-footer-extra-wrapper",
      children: extra
    }), !showTime && showNowBtn && mode === "date" && /* @__PURE__ */ emotionReactJsxRuntime_browser_esm.jsx("div", {
      className: prefixCls + "-footer-now-wrapper",
      children: /* @__PURE__ */ emotionReactJsxRuntime_browser_esm.jsx(index, {
        onClick: onSelectNow,
        children: DATEPICKER_LOCALE.today
      })
    }), shouldShouldShortcuts || showTime ? /* @__PURE__ */ emotionReactJsxRuntime_browser_esm.jsxs("div", {
      className: prefixCls + "-footer-btn-wrapper",
      children: [!shortcutsPlacementLeft ? /* @__PURE__ */ emotionReactJsxRuntime_browser_esm.jsx(shortcuts, {
        shortcuts: shortcuts$1,
        prefixCls,
        onSelectNow,
        nowText: DATEPICKER_LOCALE.now,
        showNowBtn,
        onMouseEnterShortcut,
        onMouseLeaveShortcut,
        onSelectShortcut,
        showTime
      }) : /* @__PURE__ */ emotionReactJsxRuntime_browser_esm.jsx("div", {}), showTime && /* @__PURE__ */ emotionReactJsxRuntime_browser_esm.jsxs(emotionReactJsxRuntime_browser_esm.Fragment, {
        children: [/* @__PURE__ */ emotionReactJsxRuntime_browser_esm.jsx(index$1, {
          type: "text",
          size: "mini",
          onClick: onClickSelectTimeBtn,
          className: isTimePanel ? prefixCls + "-btn-select-date" : prefixCls + "-btn-select-time",
          children: isTimePanel ? DATEPICKER_LOCALE.selectDate : DATEPICKER_LOCALE.selectTime
        }), /* @__PURE__ */ emotionReactJsxRuntime_browser_esm.jsx(index$1, {
          className: prefixCls + "-btn-confirm",
          type: "primary",
          size: "mini",
          disabled,
          onClick: onClickConfirmBtn,
          children: DATEPICKER_LOCALE.ok
        })]
      })]
    }) : null]
  });
}
module.exports = Footer;
//# sourceMappingURL=footer.js.map
