import { jsx as o } from "react/jsx-runtime";
/* empty css                                  */
import { useState as f, useRef as h } from "react";
import u from "./index-FacebookProvider.js";
import "./index-Parser.js";
import "./index-Initialize.js";
import "./index-Like.js";
import "./index-Send.js";
import "./index-Share.js";
import "./index-ShareButton.js";
import "./index-Page.js";
import "./index-Login.js";
import "./index-LoginButton.js";
import k from "./index-EmbeddedPost.js";
import "./index-EmbeddedVideo.js";
import "./index-Comments.js";
import "./index-CommentsCount.js";
import "./index-Feed.js";
import "./index-Group.js";
import "./index-Subscribe.js";
import "./index-Profile.js";
import "./index-CustomChat.js";
import "./index-MessageUs.js";
import "./index-MessengerCheckbox.js";
import "./index-SendToMessenger.js";
import "./index-FacebookContext.js";
import "./index-_virtual5.js";
import { Tweet as I } from "./index-es.js";
const M = (m) => {
  const {
    postSource: r,
    twitterPostId: t,
    facebookPostLink: c,
    postId: e,
    userId: p
  } = m, [a, n] = f(!1), d = h(null);
  let [s, i] = e ? e.split("_") : [];
  if (p && (s = p), t && (i = t), !a)
    return o("img", {
      className: "notification-social-placeholder",
      onClick: () => {
        n(!0);
      },
      src: `https://social-widget-generator.rankingcoach.com/${r}?density=2&user_id=${s}&post_id=${i}&type=photo`
    });
  const l = `${c}/posts/${i};`;
  return o("div", {
    ref: d,
    className: "notification-social-post-body ",
    children: r === "facebook" ? o(u, {
      appId: "212384205474225",
      children: o("div", {
        children: o(k, {
          handleParse: () => {
            alert("parseDone");
          },
          href: l,
          width: "706"
        })
      })
    }) : o(I, {
      tweetId: t || "841418541026877441"
    })
  });
};
export {
  M as NotificationSocialPost
};
