import { j as jsxRuntimeExports } from "../../../../../_virtual/jsx-runtime.js";
import { a as d } from "../../../../sdk/dist/shared/chunk-7A2JNQX3.js";
import "../../../../sdk/dist/shared/chunk-3YVJ2ELD.js";
import "../../../../sdk/dist/shared/chunk-AFVJZPLS.js";
import "@sinclair/typebox";
import "../../../../sdk/dist/shared/chunk-A3GF4PYW.js";
import "../../../../sdk/dist/shared/chunk-W33JMRRN.js";
import { tx as D } from "../../../../style-system/dist/twind.js";
import { useBrickStyle } from "../hooks/use-brick-style.js";
import BrickRoot from "../components/BrickRoot.js";
function Footer({ brick, editable }) {
  const props = brick.props;
  const styles = useBrickStyle(brick);
  const classes = Object.values(styles);
  const onClick = editable ? (e) => {
    e.preventDefault();
  } : void 0;
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(
    BrickRoot,
    {
      brick,
      editable,
      manifest: d,
      "data-no-section-padding": true,
      as: "footer",
      className: D(
        // Force 2 cols on mobile
        `grid gap-6 @desktop:grid-flow-col @mobile:grid-cols-2 @desktop:auto-cols-fr `,
        classes
      ),
      children: [
        props.logo?.src && /* @__PURE__ */ jsxRuntimeExports.jsx(
          "div",
          {
            className: D(
              "items-center @desktop:(mr-10 col-span-1) @mobile:(flex col-start-1 col-span-2 justify-center)"
            ),
            "data-brick-group": "brand",
            children: /* @__PURE__ */ jsxRuntimeExports.jsx("img", { src: props.logo.src, alt: props.logo.alt ?? "Logo", className: `h-full max-h-[80px] w-auto` })
          }
        ),
        props.linksSections?.map((section, index) => /* @__PURE__ */ jsxRuntimeExports.jsxs("nav", { className: D("flex flex-col @mobile:gap-3 @desktop:gap-2"), children: [
          /* @__PURE__ */ jsxRuntimeExports.jsx("h6", { className: D("uppercase font-bold opacity-80"), children: section.sectionTitle }),
          section.links?.map((link, linkIndex) => /* @__PURE__ */ jsxRuntimeExports.jsx("a", { href: link.url, onClick, className: D("link link-hover max-w-fit"), children: link.title }, linkIndex))
        ] }, index))
      ]
    }
  );
}
export {
  Footer as default
};
//# sourceMappingURL=footer.js.map
