import f from "./index-extends.js";
import C from "./index-objectWithoutPropertiesLoose.js";
import * as h from "react";
import { useLocaleText as x } from "./index-useUtils.js";
import { WrapperVariantContext as b } from "./index-WrapperVariantContext.js";
import { jsx as o } from "react/jsx-runtime";
import r from "./index-Button2.js";
import k from "./index-DialogActions.js";
const B = ["onAccept", "onClear", "onCancel", "onSetToday", "actions"], P = (l) => {
  const {
    onAccept: a,
    onClear: i,
    onCancel: s,
    onSetToday: u,
    actions: c
  } = l, m = C(l, B), d = h.useContext(b), e = x(), n = typeof c == "function" ? c(d) : c;
  if (n == null || n.length === 0)
    return null;
  const p = n == null ? void 0 : n.map((t) => {
    switch (t) {
      case "clear":
        return /* @__PURE__ */ o(r, {
          onClick: i,
          children: e.clearButtonLabel
        }, t);
      case "cancel":
        return /* @__PURE__ */ o(r, {
          onClick: s,
          children: e.cancelButtonLabel
        }, t);
      case "accept":
        return /* @__PURE__ */ o(r, {
          onClick: a,
          children: e.okButtonLabel
        }, t);
      case "today":
        return /* @__PURE__ */ o(r, {
          onClick: u,
          children: e.todayButtonLabel
        }, t);
      default:
        return null;
    }
  });
  return /* @__PURE__ */ o(k, f({}, m, {
    children: p
  }));
};
export {
  P as PickersActionBar
};
