"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const jsxDevRuntime = require("react/jsx-dev-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__ */ jsxDevRuntime.jsxDEV(Link.Link, { Component: ui.AnchorButton, componentProps: react.useMemo(() => ({ borderRadius: "full", distinction: "seamless" }), []), ...props, "aria-label": finalAriaLabel, children: /* @__PURE__ */ jsxDevRuntime.jsxDEV(ui.Stack, { horizontal: true, align: "center", children: [
    icon ?? /* @__PURE__ */ jsxDevRuntime.jsxDEV(lucideReact.ArrowLeftIcon, {}, void 0, false, {
      fileName: "/__w/interface/interface/packages/admin/src/routing/NavigateBackLink.tsx",
      lineNumber: 43,
      columnNumber: 14
    }, void 0),
    /* @__PURE__ */ jsxDevRuntime.jsxDEV(ui.VisuallyHidden, { hidden: visuallyHidden, children: children ?? formatMessage("navigationBackLink.back") }, void 0, false, {
      fileName: "/__w/interface/interface/packages/admin/src/routing/NavigateBackLink.tsx",
      lineNumber: 44,
      columnNumber: 5
    }, void 0)
  ] }, void 0, true, {
    fileName: "/__w/interface/interface/packages/admin/src/routing/NavigateBackLink.tsx",
    lineNumber: 42,
    columnNumber: 4
  }, void 0) }, void 0, false, {
    fileName: "/__w/interface/interface/packages/admin/src/routing/NavigateBackLink.tsx",
    lineNumber: 41,
    columnNumber: 3
  }, void 0);
});
NavigateBackLink.displayName = "NavigateBackLink";
exports.NavigateBackLink = NavigateBackLink;
exports.navigationBackLinkDictionary = navigationBackLinkDictionary;
//# sourceMappingURL=NavigateBackLink.cjs.map
