import { j as e } from "../../../../../_virtual/jsx-runtime.js";
import { a as c } from "../../../../sdk/dist/shared/chunk-ETYYRWLK.js";
import "@sinclair/typebox";
import "../../../../sdk/dist/shared/chunk-UU2MSQXY.js";
import "../../../../sdk/dist/shared/chunk-T3LIA4YB.js";
import "../../../../sdk/dist/shared/chunk-UMHXXXVP.js";
import { tx as i } from "../../../../style-system/dist/twind.js";
import { useBrickStyle as p } from "../hooks/use-brick-style.js";
import { InlineIcon as d } from "../../../../../node_modules/.pnpm/@iconify_react@6.0.0_react@18.3.0-canary-3d9b20132-20240124/node_modules/@iconify/react/dist/iconify.js";
import f from "../components/BrickRoot.js";
function k({ brick: s, editable: t }) {
  const n = p(s), { props: a } = s, o = Array.isArray(a.links) ? a.links : [];
  return /* @__PURE__ */ e.jsxs(
    f,
    {
      brick: s,
      editable: t,
      manifest: c,
      className: i("flex justify-start items-start gap-2", Object.values(n)),
      children: [
        t && o.length === 0 && /* @__PURE__ */ e.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__ */ e.jsx("span", { className: "text-sm text-gray-500 dark:text-gray-400", children: "Add social links to get started" }) }),
        o.map((r, m) => /* @__PURE__ */ e.jsxs(
          "a",
          {
            href: r.href,
            "data-prevented-by-editor": t ? "true" : "false",
            onClick: (l) => {
              t && l.preventDefault();
            },
            className: i("grow flex items-center gap-0.5 hover:opacity-80"),
            title: r.label || r.href,
            children: [
              r.icon && /* @__PURE__ */ e.jsx(d, { icon: r.icon, className: "text-[100%]" }),
              !a.icononly && r.label && /* @__PURE__ */ e.jsx("span", { className: "ml-1 text-nowrap", children: r.label })
            ]
          },
          m
        ))
      ]
    }
  );
}
export {
  k as default
};
//# sourceMappingURL=social-links.js.map
