import { jsx } from "react/jsx-runtime";
import PropTypes from "prop-types";
import { useIntl } from "react-intl";
import { Q as getBasename } from "./index-466b22f5.mjs";
import { a as MagicLinkWrapper } from "./index-2ed78f76.mjs";
import "@strapi/helper-plugin";
import "react-dom/client";
import "@strapi/design-system";
import "invariant";
import "lodash/isFunction";
import "lodash/merge";
import "lodash/pick";
import "react-helmet";
import "react-router-dom";
import "react";
import "react-redux";
import "@radix-ui/react-context";
import "@strapi/design-system/v2";
import "@strapi/icons";
import "formik";
import "lodash/camelCase";
import "react-query";
import "styled-components";
import "yup";
import "lodash/defaultsDeep";
import "lodash/omit";
import "qs";
import "immer";
import "lodash/get";
import "lodash/set";
import "@reduxjs/toolkit";
const MagicLinkEE = ({ registrationToken }) => {
  const { formatMessage } = useIntl();
  if (registrationToken) {
    return /* @__PURE__ */ jsx(
      MagicLinkWrapper,
      {
        target: `${window.location.origin}${getBasename()}/auth/register?registrationToken=${registrationToken}`,
        children: formatMessage({
          id: "app.components.Users.MagicLink.connect",
          defaultMessage: "Copy and share this link to give access to this user"
        })
      }
    );
  }
  return /* @__PURE__ */ jsx(MagicLinkWrapper, { target: `${window.location.origin}${getBasename()}auth/login`, children: formatMessage({
    id: "app.components.Users.MagicLink.connect.sso",
    defaultMessage: "Send this link to the user, the first login can be made via a SSO provider."
  }) });
};
MagicLinkEE.defaultProps = {
  registrationToken: ""
};
MagicLinkEE.propTypes = {
  registrationToken: PropTypes.string
};
export {
  MagicLinkEE
};
//# sourceMappingURL=index-ef863e33.mjs.map
