import { jsxs as i, jsx as r } from "react/jsx-runtime";
import { _ as l } from "./twind.D7be0E5m.js";
import { forwardRef as p } from "react";
import { b as y } from "./use-section-style.D7ZN4IXn.js";
import { I as h } from "./iconify.G_DkEANe.js";
import { u } from "./use-color-preset.B03-6uH7.js";
const x = p(({ brick: s, editable: t }, n) => {
  const c = y(s), { props: a } = s, m = u(s), o = Array.isArray(a.links) ? a.links : [];
  return /* @__PURE__ */ i(
    "div",
    {
      ref: n,
      className: l(
        "flex flex-grow shrink-0 justify-start items-start min-h-fit min-w-fit gap-2",
        Object.values(c),
        m.main
      ),
      children: [
        t && o.length === 0 && /* @__PURE__ */ r("div", { className: "flex items-center justify-center p-4 border-2 border-dashed border-gray-300 dark:border-gray-600 rounded-md", children: /* @__PURE__ */ r("span", { className: "text-sm text-gray-500 dark:text-gray-400", children: "Add social links to get started" }) }),
        o.map((e, d) => /* @__PURE__ */ i(
          "a",
          {
            href: e.href,
            "data-prevented-by-editor": t ? "true" : "false",
            onClick: (f) => {
              t && f.preventDefault();
            },
            className: l("grow flex items-center gap-0.5 hover:opacity-80"),
            title: e.label || e.href,
            children: [
              e.icon && /* @__PURE__ */ r(h, { icon: e.icon, className: "text-[100%]" }),
              !a.icononly && e.label && /* @__PURE__ */ r("span", { className: "ml-1 text-nowrap", children: e.label })
            ]
          },
          d
        ))
      ]
    }
  );
});
x.displayName = "SocialLinks";
export {
  x as default
};
//# sourceMappingURL=social-links.DZg-Qk_g.js.map
