import { jsx as e, jsxs as a } from "react/jsx-runtime";
import { l as f } from "./index.C1ZfizMq.js";
import { S as _ } from "./SiteBuilder.CwIXjSf-.js";
import { P as v } from "./PageSection.DaF45FbK.js";
import { a as p } from "./index.CfQlFjZU.js";
import { n as N } from "./index.B0wX8xO7.js";
import { S as h } from "./shared.EdGf6tcG.js";
import { v as y, b as S } from "./index.dWlEA7uO.js";
import { useMemo as u } from "react";
import { a as b } from "./SocialIcon.B0ronCv9.js";
import { B as g } from "./Button.CpTwUWVr.js";
import { C as z } from "./card.CVCKhKP6.js";
import { c as C, A as M } from "./Avatar.Chk9viGr.js";
const x = "creator_name_GfXvE", E = "creator_description_kmE2m", k = "creator_header_0j-Q0", l = { name: x, description: E, header: k }, j = "creator_account_mWgMg", B = "creator_info_X3moN", D = "creator_name_-TO8k", d = { account: j, info: B, name: D }, P = ({
  name: n,
  avatar: o,
  onDisconnect: t
}) => ({
  name: n,
  avatar: o,
  onDisconnect: t
}), R = ({
  name: n,
  avatar: o,
  onDisconnect: t
}) => /* @__PURE__ */ e(z, { elevation: "high", children: /* @__PURE__ */ a("div", { className: d.account, children: [
  /* @__PURE__ */ e(C, { url: o, size: M.MD }),
  /* @__PURE__ */ a("div", { className: d.info, children: [
    /* @__PURE__ */ e("h3", { className: d.name, children: n }),
    /* @__PURE__ */ e(
      g,
      {
        label: "Disconnect",
        semantic: h.DANGER,
        size: "small",
        prefixIcon: /* @__PURE__ */ e(y, { size: 24 }),
        onClick: t
      }
    )
  ] })
] }) }), w = p(
  R,
  P
), G = ({
  name: n,
  description: o,
  icon: t,
  buttonLabel: s,
  onConnect: i,
  hideButton: c = !1,
  accounts: r = []
}) => {
  const m = u(() => typeof t == "string" ? /* @__PURE__ */ e(b, { social: t, mode: "color" }) : t, [t]), I = u(() => Array.isArray(r) ? r.map((A) => /* @__PURE__ */ e(w, { ...A })) : r ? [r] : [], [r]);
  return {
    name: n,
    description: o,
    icon: m,
    buttonLabel: s || "Connect Account",
    hideButton: c,
    onConnect: i,
    accounts: I
  };
}, O = ({
  name: n,
  description: o,
  icon: t,
  buttonLabel: s,
  hideButton: i,
  onConnect: c,
  accounts: r
}) => /* @__PURE__ */ a(v, { children: [
  /* @__PURE__ */ a("div", { className: l.header, children: [
    t,
    /* @__PURE__ */ e("h2", { className: l.name, children: n })
  ] }),
  /* @__PURE__ */ e("p", { className: l.description, children: o }),
  /* @__PURE__ */ e(f, { values: r, layout: (m) => m }),
  /* @__PURE__ */ e(
    N,
    {
      value: !i,
      then: /* @__PURE__ */ e(
        g,
        {
          label: s,
          semantic: h.PRIMARY,
          size: "small",
          prefixIcon: /* @__PURE__ */ e(S, { size: 24 }),
          onClick: c
        }
      )
    }
  )
] }), T = p(O, G), Z = ({ integrations: n }) => /* @__PURE__ */ e(_, { title: "Integrations", children: /* @__PURE__ */ e(
  f,
  {
    values: n,
    layout: (o) => /* @__PURE__ */ e(T, { ...o })
  }
) });
export {
  Z as I,
  T as a,
  w as b
};
