import { jsxs, jsx } from "react/jsx-runtime";
import { Button } from "../Button/index.js";
function DatePickerFooter({
  tertiaryButtonProps,
  secondaryButtonProps,
  primaryButtonProps,
  setSelectedDate,
  setFocused,
  onTertiaryButtonClick,
  onSecondaryButtonClick,
  onPrimaryButtonClick,
  setIsOpen
}) {
  const handleClear = () => {
    setSelectedDate == null ? void 0 : setSelectedDate(null);
    setFocused(false);
    onTertiaryButtonClick == null ? void 0 : onTertiaryButtonClick();
  };
  const handleCancel = () => {
    setIsOpen(false);
    setFocused(false);
    onSecondaryButtonClick == null ? void 0 : onSecondaryButtonClick();
  };
  const handleApply = () => {
    setIsOpen(false);
    onPrimaryButtonClick == null ? void 0 : onPrimaryButtonClick();
  };
  return /* @__PURE__ */ jsxs("div", { className: "datePicker-buttons-container", children: [
    /* @__PURE__ */ jsx(Button, { size: "small", variant: "url", onClick: handleClear, ...tertiaryButtonProps, children: "Clear" }),
    /* @__PURE__ */ jsx(Button, { size: "small", variant: "secondary", onClick: handleCancel, ...secondaryButtonProps, children: "Cancel" }),
    /* @__PURE__ */ jsx(Button, { size: "small", variant: "primary", onClick: handleApply, ...primaryButtonProps, children: "Apply" })
  ] });
}
export {
  DatePickerFooter
};
