"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const jsxRuntime = require("react/jsx-runtime");
const ui = require("@contember/ui");
const lucideReact = require("lucide-react");
const react = require("react");
const reactI18n = require("@contember/react-i18n");
const Link = require("./Link.cjs");
const navigationBackLinkDictionary = {
  navigationBackLink: {
    back: "Back"
  }
};
const NavigateBackLink = react.memo(({
  icon,
  ariaLabel,
  children,
  visuallyHidden = true,
  ...props
}) => {
  const formatMessage = reactI18n.useMessageFormatter(navigationBackLinkDictionary);
  const finalAriaLabel = typeof children === "string" ? children : ariaLabel ?? formatMessage("navigationBackLink.back");
  return /* @__PURE__ */ jsxRuntime.jsx(Link.Link, { Component: ui.AnchorButton, componentProps: react.useMemo(() => ({ borderRadius: "full", distinction: "seamless" }), []), ...props, "aria-label": finalAriaLabel, children: /* @__PURE__ */ jsxRuntime.jsxs(ui.Stack, { horizontal: true, align: "center", children: [
    icon ?? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ArrowLeftIcon, {}),
    /* @__PURE__ */ jsxRuntime.jsx(ui.VisuallyHidden, { hidden: visuallyHidden, children: children ?? formatMessage("navigationBackLink.back") })
  ] }) });
});
NavigateBackLink.displayName = "NavigateBackLink";
exports.NavigateBackLink = NavigateBackLink;
exports.navigationBackLinkDictionary = navigationBackLinkDictionary;
//# sourceMappingURL=NavigateBackLink.cjs.map
