import { jsxs, jsx } from "react/jsx-runtime";
import { be as manifest } from "./use-page-data.CMUQyNAA.js";
import "@sinclair/typebox";
import { a as tx } from "./twind.DdSZmZu6.js";
import { b as useBrickStyle } from "./use-section-style.DjjgfIQS.js";
import { a as InlineIcon } from "./iconify.DjLEvsi5.js";
import { B as BrickRoot } from "./BrickRoot.D_a_fRJm.js";
function SocialLinks({ brick, editable }) {
  const styles = useBrickStyle(brick);
  const { props } = brick;
  const links = Array.isArray(props.links) ? props.links : [];
  return /* @__PURE__ */ jsxs(
    BrickRoot,
    {
      brick,
      editable,
      manifest,
      className: tx("flex justify-start items-start gap-2", Object.values(styles)),
      children: [
        editable && links.length === 0 && /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center p-4 border-2 border-dashed border-gray-300 dark:border-gray-600 rounded-md", children: /* @__PURE__ */ jsx("span", { className: "text-sm text-gray-500 dark:text-gray-400", children: "Add social links to get started" }) }),
        links.map((link, index) => {
          return /* @__PURE__ */ jsxs(
            "a",
            {
              href: link.href,
              "data-prevented-by-editor": editable ? "true" : "false",
              onClick: (e) => {
                if (editable) {
                  e.preventDefault();
                }
              },
              className: tx("grow flex items-center gap-0.5 hover:opacity-80"),
              title: link.label || link.href,
              children: [
                link.icon && /* @__PURE__ */ jsx(InlineIcon, { icon: link.icon, className: "text-[100%]" }),
                !props.iconOnly && link.label && /* @__PURE__ */ jsx("span", { className: "ml-1 text-nowrap", children: link.label })
              ]
            },
            index
          );
        })
      ]
    }
  );
}
export {
  SocialLinks as default
};
//# sourceMappingURL=social-links.MLNI8JQ4.js.map
