import { jsxs as u, jsx as s } from "@emotion/react/jsx-runtime";
import { useEnvironment as C } from "@m4l/core";
import { PagerIconsStyled as k, PageCounterStyled as b } from "../../slots/PagerSlots.js";
import { IconButton as i } from "../../../extended/mui/IconButton/IconButton.js";
function B(d) {
  const {
    size: n,
    count: c,
    page: t,
    rowsPerPage: l,
    onPageChange: a,
    pageCounter: g
    //classes
  } = d, { host_static_assets: o, environment_assets: r } = C(), p = (e) => {
    a(e, 0);
  }, m = (e) => {
    a(e, t - 1);
  }, h = (e) => {
    a(e, t + 1);
  }, f = (e) => {
    a(e, Math.max(0, Math.ceil(c / l) - 1));
  };
  return /* @__PURE__ */ u(k, { children: [
    /* @__PURE__ */ s(
      i,
      {
        size: n,
        onClick: p,
        disabled: t === 0,
        "aria-label": "first page",
        src: `${o}/${r}/frontend/components/pager/assets/icons/first.svg`
      }
    ),
    /* @__PURE__ */ s(
      i,
      {
        size: n,
        onClick: m,
        disabled: t === 0,
        "aria-label": "first page",
        src: `${o}/${r}/frontend/components/pager/assets/icons/previous.svg`
      }
    ),
    /* @__PURE__ */ s(b, { skeletonWidth: 50, size: n, variant: "bodyStandard", children: g }),
    /* @__PURE__ */ s(
      i,
      {
        size: n,
        onClick: h,
        disabled: t >= Math.ceil(c / l) - 1,
        "aria-label": "next page",
        src: `${o}/${r}/frontend/components/pager/assets/icons/next.svg`
      }
    ),
    /* @__PURE__ */ s(
      i,
      {
        size: n,
        onClick: f,
        disabled: t >= Math.ceil(c / l) - 1,
        "aria-label": "last page",
        src: `${o}/${r}/frontend/components/pager/assets/icons/last.svg`
      }
    )
  ] });
}
export {
  B as PagerActions
};
