import { jsx as o } from "react/jsx-runtime";
import c from "../MapSettingsTile.js";
import { useMapContext as s } from "../../../MapContext.js";
import { MapIcon as p } from "../../../../icons/MapIcon.js";
const g = (t) => {
  const { onGoBack: r, ...e } = t, { viewportHistory: a } = s(), { canGoBack: n, goBack: i } = a;
  return n ? /* @__PURE__ */ o(
    c,
    {
      className: "MapPreviousViewportButton",
      isActive: !0,
      activeIcon: /* @__PURE__ */ o(p, { name: "rioglyph-arrow-left", className: "MapPreviousViewportButtonIcon text-color-gray" }),
      onToggle: () => {
        i(), r?.();
      },
      ...e
    }
  ) : null;
};
export {
  g as default
};
//# sourceMappingURL=MapPreviousViewportButton.js.map
