import { jsx as t, Fragment as i, jsxs as c } from "react/jsx-runtime";
import l, { useState as s } from "react";
import { Config as f } from "../conf/index.js";
function h() {
  const [e, n] = s(null);
  if (!e) {
    const r = f.REACT_APP_WP_API;
    fetch(r).then((o) => o.json()).then((o) => {
      o && o.site_icon_url && n(o.site_icon_url);
    }).catch((o) => {
      console.error("Failed to fetch favicon:", o);
    });
  }
  return /* @__PURE__ */ t(i, { children: e && /* @__PURE__ */ c(i, { children: [
    /* @__PURE__ */ t("link", { rel: "icon", href: e }),
    /* @__PURE__ */ t("link", { rel: "apple-touch-icon", href: e }),
    /* @__PURE__ */ t("link", { rel: "shortcut", href: e })
  ] }) });
}
const _ = l.memo(h);
export {
  _ as default
};
