import { jsx } from "react/jsx-runtime";
import { IconChevronLeft } from "../../icons/index.mjs";
/* empty css                                                                                                                                                                                       */
/* empty css                                                                                                                                                                                        */
/* empty css                                                                                                                                                                                                */
/* empty css                                                                                                                                                                                           */
/* empty css                                                                                                                                                                                           */
import { clsx } from "clsx";
import { ActionIcon } from "../../node_modules/.pnpm/@mantine_core@7.17.8_patch_hash_3qirwkgu3wxhvd6hnr2gb24yzq_@mantine_hooks@7.17.8_react@18.3.1_e5yvlgwhmeykc75dkphi7jou6q/node_modules/@mantine/core/esm/components/ActionIcon/ActionIcon.mjs";
const PageShellBaseBackButton = ({ className, onClick, ...rest }) => {
  const handleClick = () => {
    if (onClick) {
      onClick();
    } else {
      history.back();
    }
  };
  return /* @__PURE__ */ jsx(
    ActionIcon,
    {
      variant: "default",
      onClick: handleClick,
      "aria-label": "Navigate Back",
      ...rest,
      className: clsx(className, "tiui-page-shell-back-button"),
      children: /* @__PURE__ */ jsx(IconChevronLeft, { size: 20 })
    }
  );
};
export {
  PageShellBaseBackButton
};
