import cx from "classnames";
import React, { useContext } from "react";
import { RicosContext } from "./../../ricos-context/index.js";
import styles from "../../_shared/plugin-toolbar/url-link-button/url-link-button-scss.js";
const AnchorLinkButton = ({ toolbarItem }) => {
  const { isMobile, t } = useContext(RicosContext);
  const dataHook = toolbarItem.presentation?.dataHook;
  return /* @__PURE__ */ React.createElement("div", { className: styles.toolbarUrlContainer }, /* @__PURE__ */ React.createElement(
    "button",
    {
      "data-hook": dataHook,
      className: cx(styles.toolbarUrl, styles.toolbarUrlAnchor, isMobile && styles.isMobile),
      onClick: (e) => {
        e.preventDefault();
        toolbarItem.commands.click();
      },
      onMouseDown: (e) => {
        e.preventDefault();
      },
      type: "button",
      tabIndex: toolbarItem.presentation.tabIndex
    },
    t("LinkTo_Toolbar_GoTo")
  ));
};
export {
  AnchorLinkButton
};
//# sourceMappingURL=anchor-link-button.js.map
