import { jsx as t, jsxs as n } from "react/jsx-runtime";
import { useLinkOpenButtonState as s } from "@udecode/plate-link";
import { getUrlFromLinkOrLegacyLink as d } from "../../utils/getUrl.es.js";
import l from "../../../../../../foundation/Icon/Generated/IconPen16.es.js";
import m from "../../../../../../foundation/Icon/Generated/IconTrashBin16.es.js";
import { LINK_PLUGIN as p } from "../../id.es.js";
import { FloatingModalWrapper as c } from "../../../../components/FloatingModal/FloatingModal.es.js";
import { useRichTextEditorContext as w } from "../../../../context/RichTextEditorContext.es.js";
const I = ({ editButtonProps: o, unlinkButtonProps: r }) => {
  const { element: e } = s(), { styles: i } = w(), a = e ? d(e) : "";
  return /* @__PURE__ */ t(c, { "data-test-id": "floating-link-edit", padding: "16px", minWidth: "400px", children: /* @__PURE__ */ n("span", { "data-test-id": "preview-link-flyout", className: "tw-flex tw-justify-between", children: [
    /* @__PURE__ */ t("span", { style: i[p], className: "tw-pointer-events-none", children: a }),
    /* @__PURE__ */ n("span", { className: "tw-flex tw-gap-2", children: [
      /* @__PURE__ */ t(
        "button",
        {
          tabIndex: 0,
          "data-test-id": "edit-link-button",
          className: "tw-transition tw-cursor-pointer tw-rounded hover:tw-bg-black-10 tw-p-1",
          ...o,
          children: /* @__PURE__ */ t(l, {})
        }
      ),
      /* @__PURE__ */ t(
        "button",
        {
          tabIndex: 0,
          "data-test-id": "remove-link-button",
          className: "tw-transition tw-cursor-pointer tw-rounded hover:tw-bg-black-10 tw-p-1",
          ...r,
          children: /* @__PURE__ */ t(m, {})
        }
      )
    ] })
  ] }) });
};
export {
  I as EditModal
};
//# sourceMappingURL=EditModal.es.js.map
