import React, { useMemo } from "react";
import Anchor from "../../anchor";
import { Text } from "@netdata/netdata-ui";
export const makeCloudConnectionStatusInfo = ({ nodeStatus, userStatus, date, }) => ({
    title: "Netdata Cloud connection status",
    text: {
        header: () => {
            return (React.createElement(Text, null,
                "This node is currently",
                " ",
                React.createElement(Text, { strong: true }, nodeStatus === "LIVE" ? "Connected" : "Not Connected"),
                " to Netdata Cloud"));
        },
        bullets: nodeStatus === "NOT_LIVE"
            ? [
                // `The node lost its Netdata Cloud connection at ${date}`,
                () => (React.createElement(Text, null,
                    "To troubleshoot Netdata Cloud connection issues, please follow",
                    " ",
                    React.createElement(Anchor, { target: "_blank", rel: "noopener noreferrer", href: "https://learn.netdata.cloud/docs/agent/claim#troubleshooting" }, "this guide"),
                    ".")),
            ]
            : [],
        footer: () => (React.createElement(Text, null,
            "You are",
            " ",
            React.createElement(Text, { strong: true }, userStatus === "LOGGED_IN"
                ? "Logged In"
                : userStatus === "EXPIRED_LOGIN"
                    ? "Logged out"
                    : "Not signed-up"),
            " ",
            "to Netdata Cloud")),
    },
    CTA1: {
        text: "Take me to Netdata Cloud",
    },
});
const useCloudConnectionStatus = ({ userStatus, nodeStatus, date }) => {
    const cloudConnectionStatusInfo = useMemo(() => {
        return makeCloudConnectionStatusInfo({ userStatus, nodeStatus, date });
    }, [userStatus, nodeStatus, date]);
    return cloudConnectionStatusInfo;
};
export default useCloudConnectionStatus;
//# sourceMappingURL=use-cloud-connection-status.js.map