import { jsx as o } from "react/jsx-runtime";
import i from "prop-types";
import { useTheme as a, Box as r } from "@mui/material";
import { Icon as c } from "@iconify/react";
import f from "@iconify-icons/material-symbols/refresh-rounded";
function l({ onRefresh: n, ...e }) {
  const { palette: t } = a();
  return /* @__PURE__ */ o(
    r,
    {
      ...e,
      onClick: (s) => {
        s.stopPropagation(), n();
      },
      sx: {
        position: "absolute",
        top: 0,
        bottom: 0,
        left: 0,
        right: 0,
        display: "flex",
        justifyContent: "center",
        alignItems: "center",
        backgroundColor: "rgba(255, 255, 255, 0.75)",
        cursor: "pointer",
        ...e.sx
      },
      children: /* @__PURE__ */ o(
        r,
        {
          sx: {
            backgroundColor: "secondary.main",
            borderRadius: "100%",
            fontSize: 0
          },
          children: /* @__PURE__ */ o(
            c,
            {
              icon: f,
              fontSize: 52,
              style: {
                transform: "scale(0.7)",
                color: t.secondary.contrastText
              }
            }
          )
        }
      )
    }
  );
}
l.propTypes = {
  onRefresh: i.func.isRequired
};
export {
  l as default
};
