/**
 * Style Getter JS file for template
 * @package fga.marketing-materials
 */
/// <reference path="../../types/app.d.ts" />
/// <reference path="../../types/data.d.ts" />

/**
 *
 * @param {*} item
 * @returns {SectionStyle}
 */
const getSectionStyle = (item) => {
  switch (item.style) {
    case 1:
      return {
        parent: {
          type: "section",
          attributes: {
            "data-section": item.tag,
            ...item.attributes,
            classList: item.attributes.classList + " relative",
          },
          children: [
            item.image && {
              type: "div",
              attributes: {
                classList:
                  "absolute z-10 w-full h-full bg-center bg-cover top-0 md:w-1/2 md:h-full opacity-15",
                style: {
                  backgroundImage: `url(assets/images/background/${item.image.src})`,
                  [item.image.position]: 0,
                },
              },
            },
            {
              type: "div",
              attributes: {
                classList: "container space-y-3 relative z-20",
              },
              children: [
                {
                  type: "div",
                  attributes: {
                    classList: "text-center space-y-1",
                  },
                  children: [
                    {
                      type: "h4",
                      attributes: {
                        classList:
                          "text-xl capitalize border-b-2 w-fit mx-auto px-4",
                        style: {
                          borderColor: COLORS.principal_color,
                        },
                        innerHTML: item.subtitle,
                      },
                    },
                    {
                      type: "h2",
                      attributes: {
                        classList: "text-4xl font-bold",
                        innerHTML: item.title,
                      },
                    },
                  ],
                },
                {
                  type: "p",
                  attributes: {
                    classList: "text-center",
                    innerHTML: item.message,
                  },
                },
                {
                  type: "div",
                  attributes: {
                    classList:
                      "flex gap-x-4 gap-y-8 pt-8 flex-wrap justify-center",
                  },
                  children: item.list.map((listItem) => ({
                    type: "div",
                    attributes: {
                      classList:
                        "w-[300px] relative px-4 pt-5 pb-3 bg-white rounded-lg shadow border-l-4 border-b-4 space-y-1 item",
                      style: {
                        borderColor: COLORS.principal_color,
                      },
                    },
                    children: [
                      (listItem.icon || listItem.image) && {
                        type: "div",
                        attributes: {
                          classList:
                            "absolute -top-5 left-5 px-1 py-1 h-10 w-10 rounded flex items-center justify-center",
                          style: {
                            backgroundColor: COLORS.principal_color,
                          },
                        },
                        children: [
                          listItem.icon && {
                            type: "i",
                            attributes: {
                              style: {
                                color: listItem.icon.color,
                              },
                              classList:
                                "text-xl fa-solid " + listItem.icon.name,
                            },
                          },
                          listItem.image && {
                            type: "picture",
                            children: [
                              {
                                type: "source",
                                attributes: {
                                  srcset:
                                    "assets/images/icon/" + listItem.image.src,
                                },
                              },
                              {
                                type: "img",
                                attributes: {
                                  classList: "w-auto h-[20px]",
                                  style: {
                                    filter: listItem.image.inverted
                                      ? "invert(1)"
                                      : "none",
                                  },
                                },
                              },
                            ],
                          },
                        ],
                      },
                      listItem.title && {
                        type: "h3",
                        attributes: {
                          classList: "text-xl font-bold",
                          innerHTML: listItem.title,
                        },
                      },
                      listItem.message && {
                        type: "p",
                        attributes: {
                          innerHTML: listItem.message,
                        },
                      },
                      listItem.list && {
                        type: "ul",
                        attributes: {
                          classList: "list-disc pl-5",
                        },
                        children: listItem.list.map((item) => ({
                          type: "li",
                          attributes: {
                            classList: "text-sm",
                            innerHTML: item,
                          },
                        })),
                      },
                    ],
                  })),
                },
                {
                  type: "p",
                  attributes: {
                    classList: "text-center text-md !mt-8",
                    innerHTML: item.footer,
                  },
                },
              ],
            },
          ],
        },
      };
    case 2:
      return {
        parent: {
          type: "section",
          attributes: {
            "data-section": item.tag,
            ...item.attributes,
            classList: item.attributes.classList + " relative",
          },
          children: [
            item.image && {
              type: "div",
              attributes: {
                classList:
                  "absolute z-10 w-full h-full bg-center bg-cover top-0 md:w-1/2 md:h-full opacity-15",
                style: {
                  backgroundImage: `url(assets/images/background/${item.image.src})`,
                  [item.image.position]: 0,
                },
              },
            },
            {
              type: "div",
              attributes: {
                classList: "container space-y-3",
              },
              children: [
                {
                  type: "div",
                  attributes: {
                    classList: "space-y-1",
                  },
                  children: [
                    {
                      type: "h4",
                      attributes: {
                        classList: "text-xl capitalize border-b-2 w-fit px-4",
                        style: {
                          borderColor: COLORS.principal_color,
                        },
                        innerHTML: item.subtitle,
                      },
                    },
                    {
                      type: "h2",
                      attributes: {
                        classList: "text-4xl font-bold",
                        innerHTML: item.title,
                      },
                    },
                    {
                      type: "p",
                      attributes: {
                        innerHTML: item.message,
                      },
                    },
                    {
                      type: "div",
                      attributes: {},
                      children: [
                        {
                          type: "div",
                          attributes: {
                            classList: "space-y-8 mt-8",
                          },
                          children: item.list.map(
                            (listItem, listItemIndex) => ({
                              type: "div",
                              attributes: {
                                classList:
                                  "relative flex gap-x-4 gap-y-8 after:content-[''] after:bg-white after:h-full after:left-4 after:absolute after:top-[2rem] after:w-[1px] last-of-type:after:hidden item",
                              },
                              children: [
                                {
                                  type: "div",
                                  attributes: {
                                    classList:
                                      "rounded-full w-8 h-8 bg-white shadow flex items-center justify-center font-bold text-black",
                                    innerHTML: (listItemIndex + 1).toString(),
                                  },
                                },
                                {
                                  type: "div",
                                  attributes: {
                                    classList: "w-[calc(100%-4rem)]",
                                  },
                                  children: [
                                    {
                                      type: "div",
                                      attributes: {
                                        classList: "flex gap-2 items-center",
                                      },
                                      children: [
                                        listItem.icon && {
                                          type: "i",
                                          attributes: {
                                            style: {
                                              color: listItem.icon.color,
                                            },
                                            classList:
                                              "text-xl fa-solid " +
                                              listItem.icon.name,
                                          },
                                        },
                                        listItem.image && {
                                          type: "picture",
                                          children: [
                                            {
                                              type: "source",
                                              attributes: {
                                                srcset:
                                                  "assets/images/icon/" +
                                                  listItem.image.src,
                                              },
                                            },
                                            {
                                              type: "img",
                                              attributes: {
                                                classList: "w-auto h-[20px]",
                                                style: {
                                                  filter: listItem.image
                                                    .inverted
                                                    ? "invert(1)"
                                                    : "none",
                                                },
                                              },
                                            },
                                          ],
                                        },
                                        {
                                          type: "p",
                                          attributes: {
                                            classList: "text-xl font-bold",
                                            innerHTML: listItem.title,
                                          },
                                        },
                                      ],
                                    },
                                    listItem.message && {
                                      type: "p",
                                      attributes: {
                                        innerHTML: listItem.message,
                                      },
                                    },
                                    listItem.list && {
                                      type: "ul",
                                      attributes: {
                                        classList: "list-disc pl-5",
                                      },
                                      children: listItem.list.map((item) => ({
                                        type: "li",
                                        attributes: {
                                          classList: "text-sm",
                                          innerHTML: item,
                                        },
                                      })),
                                    },
                                  ],
                                },
                              ],
                            }),
                          ),
                        },
                      ],
                    },
                    {
                      type: "p",
                      attributes: {
                        classList: "text-center text-md !mt-8",
                        innerHTML: item.footer,
                      },
                    },
                  ],
                },
              ],
            },
          ],
        },
      };
    case 3:
      return {
        parent: {
          type: "section",
          attributes: {
            "data-section": item.tag,
            ...item.attributes,
            classList: item.attributes.classList + " relative",
          },
          children: [
            item.image && {
              type: "div",
              attributes: {
                classList:
                  "absolute z-10 w-full h-full bg-center bg-cover top-0 md:w-1/2 md:h-full opacity-15",
                style: {
                  backgroundImage: `url(assets/images/background/${item.image.src})`,
                  [item.image.position]: 0,
                },
              },
            },
            {
              type: "div",
              attributes: {
                classList: "container space-y-3",
              },
              children: [
                {
                  type: "div",
                  attributes: {
                    classList: "space-y-1",
                  },
                  children: [
                    {
                      type: "h4",
                      attributes: {
                        classList: "text-xl capitalize border-b-2 w-fit px-4",
                        style: {
                          borderColor: COLORS.principal_color,
                        },
                        innerHTML: item.subtitle,
                      },
                    },
                    {
                      type: "h2",
                      attributes: {
                        classList: "text-4xl font-bold",
                        innerHTML: item.title,
                      },
                    },
                    {
                      type: "p",
                      attributes: {
                        innerHTML: item.message,
                      },
                    },
                    {
                      type: "div",
                      attributes: {},
                      children: [
                        {
                          type: "div",
                          attributes: {
                            classList:
                              "flex gap-8 justify-center mt-8 flex-wrap",
                          },
                          children: item.list.map((listItem) => ({
                            type: "div",
                            attributes: {
                              classList:
                                "min-w-[300px] max-w-[350px] px-4 py-3 rounded shadow item border",
                            },
                            children: [
                              {
                                type: "div",
                                attributes: {
                                  classList: "flex gap-4 items-center",
                                },
                                children: [
                                  listItem.icon && {
                                    type: "i",
                                    attributes: {
                                      style: {
                                        color: listItem.icon.color,
                                      },
                                      classList:
                                        "text-xl fa-solid " +
                                        listItem.icon.name,
                                    },
                                  },
                                  listItem.image && {
                                    type: "picture",
                                    children: [
                                      {
                                        type: "source",
                                        attributes: {
                                          srcset:
                                            "assets/images/icon/" +
                                            listItem.image.src,
                                        },
                                      },
                                      {
                                        type: "img",
                                        attributes: {
                                          classList: "w-auto h-[20px]",
                                          style: {
                                            filter: listItem.image.inverted
                                              ? "invert(1)"
                                              : "none",
                                          },
                                        },
                                      },
                                    ],
                                  },
                                  {
                                    type: "p",
                                    attributes: {
                                      classList: "text-xl font-bold",
                                      innerHTML: listItem.title,
                                    },
                                  },
                                ],
                              },
                              listItem.message && {
                                type: "p",
                                attributes: {
                                  innerHTML: listItem.message,
                                },
                              },
                              listItem.list && {
                                type: "ul",
                                attributes: {
                                  classList: "list-disc pl-5",
                                },
                                children: listItem.list.map((item) => ({
                                  type: "li",
                                  attributes: {
                                    classList: "text-sm",
                                    innerHTML: item,
                                  },
                                })),
                              },
                            ],
                          })),
                        },
                      ],
                    },
                    {
                      type: "div",
                      attributes: {},
                      children: [
                        {
                          type: "p",
                          attributes: {
                            classList: "text-center text-md !mt-8",
                            innerHTML: item.footer,
                          },
                        },
                      ],
                    },
                  ],
                },
              ],
            },
          ],
        },
      };
    case `gallery`:
      return {
        parent: {
          type: "section",
          attributes: {
            "data-section": item.tag,
            ...item.attributes,
            classList: item.attributes.classList + " relative",
          },
          children: [
            item.image && {
              type: "div",
              attributes: {
                classList:
                  "absolute z-10 w-full h-full bg-center bg-cover top-0 md:w-1/2 md:h-full opacity-15",
                style: {
                  backgroundImage: `url(assets/images/background/${item.image.src})`,
                  [item.image.position]: 0,
                },
              },
            },
            {
              type: "div",
              attributes: {
                classList: "container",
              },
              children: [
                {
                  type: "div",
                  attributes: {
                    classList: "space-y-1",
                  },
                  children: [
                    {
                      type: "h4",
                      attributes: {
                        classList: "text-xl capitalize border-b-2 w-fit px-4",
                        style: {
                          borderColor: COLORS.principal_color,
                        },
                        innerHTML: item.subtitle,
                      },
                    },
                    {
                      type: "h2",
                      attributes: {
                        classList: "text-4xl font-bold",
                        innerHTML: item.title,
                      },
                    },
                    {
                      type: "p",
                      attributes: {
                        innerHTML: item.message,
                      },
                    },
                  ],
                },
                {
                  type: "div",
                  attributes: {
                    "data-swiper": "container",
                    classList: "swiper mt-8 max-w-[700px] mx-auto",
                  },
                  children: [
                    {
                      type: "div",
                      attributes: {
                        classList: "swiper-wrapper",
                      },
                      children: item.list.map((listItem) => ({
                        type: "div",
                        attributes: {
                          classList: "swiper-slide",
                        },
                        children: [
                          {
                            type: "div",
                            attributes: {
                              classList:
                                "absolute bottom-0 left-0 w-full px-4 py-6 bg-black/75 backdrop-blur text-white rounded-b-lg",
                            },
                            children: [
                              {
                                type: "h3",
                                attributes: {
                                  classList: "text-2xl font-bold",
                                  innerHTML: listItem.title,
                                },
                              },
                              {
                                type: "p",
                                attributes: {
                                  classList: "hidden sm:block",
                                  innerHTML: listItem.message,
                                },
                              },
                              listItem.button && {
                                type: "a",
                                attributes: {
                                  href: listItem.button.link,
                                  classList: "inline-block mt-2",
                                },
                                children: [
                                  {
                                    type: "button",
                                    attributes: {
                                      classList:
                                        "px-4 py-2 rounded hover:shadow-lg text-xs",
                                      style: listItem.button.attributes.style,
                                      innerHTML: listItem.button.text,
                                    },
                                  },
                                ],
                              },
                            ],
                          },
                          {
                            type: "picture",
                            children: [
                              {
                                type: "source",
                                attributes: {
                                  srcset: `assets/images/gallery/${listItem.img.src}`,
                                },
                              },
                              {
                                type: "img",
                                attributes: {
                                  classList:
                                    "w-full aspect-[4/3] object-cover rounded-lg",
                                },
                              },
                            ],
                          },
                        ],
                      })),
                    },
                    {
                      type: "div",
                      attributes: {
                        classList:
                          "swiper-pagination [&>.swiper-pagination-bullet-active]:bg-[var(--principal-color)]",
                        style: {
                          "--principal-color": COLORS.principal_color,
                        },
                      },
                    },
                    {
                      type: "div",
                      attributes: {
                        classList: "swiper-button-prev group",
                      },
                      children: [
                        {
                          type: "i",
                          attributes: {
                            classList:
                              "fas fa-chevron-left duration-300 group-hover:scale-110 group-hover:-translate-x-1",
                            style: {
                              color: COLORS.principal_color,
                            },
                          },
                        },
                      ],
                    },
                    {
                      type: "div",
                      attributes: {
                        classList: "swiper-button-next group",
                      },
                      children: [
                        {
                          type: "i",
                          attributes: {
                            classList:
                              "fas fa-chevron-right duration-300 group-hover:scale-110 group-hover:translate-x-1",
                            style: {
                              color: COLORS.principal_color,
                            },
                          },
                        },
                      ],
                    },
                  ],
                },
                {
                  type: "div",
                  attributes: {},
                  children: [
                    {
                      type: "p",
                      attributes: {
                        classList: "text-center text-md !mt-8",
                        innerHTML: item.footer,
                      },
                    },
                  ],
                },
              ],
            },
          ],
        },
      };

    case "clients":
      return {
        parent: {
          type: "section",
          attributes: {
            "data-section": item.tag,
            ...item.attributes,
            classList: item.attributes.classList + " relative",
          },
          children: [
            item.image && {
              type: "div",
              attributes: {
                classList:
                  "absolute z-10 w-full h-full bg-center bg-cover top-0 md:w-1/2 md:h-full opacity-15",
                style: {
                  backgroundImage: `url(assets/images/background/${item.image.src})`,
                  [item.image.position]: 0,
                },
              },
            },
            {
              type: "div",
              attributes: {
                classList: "container",
              },
              children: [
                {
                  type: "div",
                  attributes: {
                    classList: "space-y-1",
                  },
                  children: [
                    {
                      type: "h4",
                      attributes: {
                        classList:
                          "text-xl capitalize border-b-2 w-fit px-4 mx-auto",
                        style: {
                          borderColor: COLORS.principal_color,
                        },
                        innerHTML: item.subtitle,
                      },
                    },
                    {
                      type: "h2",
                      attributes: {
                        classList: "text-4xl font-bold text-center",
                        innerHTML: item.title,
                      },
                    },
                    {
                      type: "p",
                      attributes: {
                        classList: "text-center",
                        innerHTML: item.message,
                      },
                    },
                  ],
                },
                {
                  type: "div",
                  attributes: {
                    classList: "flex gap-4 justify-center mt-8 flex-wrap",
                  },
                  children: item.list.map((listItem) => ({
                    type: "div",
                    attributes: {
                      classList: "w-auto h-20 relative",
                    },
                    children: [
                      {
                        type: "a",
                        attributes: listItem.href
                          ? {
                              href: listItem.href,
                              target: "_blank",
                            }
                          : {},
                        children: [
                          {
                            type: "picture",
                            children: [
                              {
                                type: "source",
                                attributes: {
                                  srcset:
                                    "assets/images/clients/" + listItem.src,
                                },
                              },
                              {
                                type: "img",
                                attributes: {
                                  classList: "w-auto h-20",
                                },
                              },
                            ],
                          },
                        ],
                      },
                    ],
                  })),
                },
                {
                  type: "div",
                  attributes: {},
                  children: [
                    {
                      type: "p",
                      attributes: {
                        classList: "text-center text-md !mt-8",
                        innerHTML: item.footer,
                      },
                    },
                  ],
                },
              ],
            },
          ],
        },
      };
    case `our-team`:
      return {
        parent: {
          type: "section",
          attributes: {
            "data-section": item.tag,
            ...item.attributes,
            classList: item.attributes.classList + " relative",
          },
          children: [
            item.image && {
              type: "div",
              attributes: {
                classList:
                  "absolute z-10 w-full h-full bg-center bg-cover top-0 md:w-1/2 md:h-full opacity-15",
                style: {
                  backgroundImage: `url(assets/images/background/${item.image.src})`,
                  [item.image.position]: 0,
                },
              },
            },
            {
              type: "div",
              attributes: {
                classList: "py-2",
                style: {
                  backgroundColor: COLORS.principal_color,
                },
              },
              children: [
                {
                  type: "div",
                  attributes: {
                    classList: "container",
                  },
                  children: [
                    {
                      type: "h4",
                      attributes: {
                        classList:
                          "text-xl capitalize border-b-2 w-fit mx-auto px-4 text-white text-center",
                        innerHTML: item.subtitle,
                      },
                    },
                    {
                      type: "h2",
                      attributes: {
                        classList: "text-4xl font-bold text-white text-center",
                        innerHTML: item.title,
                      },
                    },
                    {},
                  ],
                },
              ],
            },
            {
              type: "div",
              children: item.list.map((listItem, listItemIndex) => ({
                type: "div",
                attributes: {
                  style: {
                    backgroundColor:
                      listItemIndex % 2 === 0 ? COLORS.light_1 : COLORS.light_2,
                  },
                },
                children: [
                  {
                    type: "div",
                    attributes: {
                      classList: "container",
                    },
                    children: [
                      {
                        type: "div",
                        attributes: {
                          classList:
                            "flex flex-col gap-4 items-center py-8 items-center " +
                            (listItemIndex % 2 === 0
                              ? "sm:flex-row"
                              : "sm:flex-row-reverse"),
                        },
                        children: [
                          {
                            type: "picture",
                            children: [
                              {
                                type: "source",
                                attributes: {
                                  srcset:
                                    "assets/images/" +
                                    item.tag +
                                    "/" +
                                    item.tag +
                                    "-" +
                                    (listItemIndex + 1) +
                                    ".webp",
                                },
                              },
                              {
                                type: "img",
                                attributes: {
                                  classList:
                                    "min-w-[200px] w-[200px] h-auto rounded-xl object-cover",
                                },
                              },
                            ],
                          },
                          {
                            type: "div",
                            attributes: {
                              classList: "space-y-2 grow",
                            },
                            children: [
                              {
                                type: "div",
                                children: [
                                  {
                                    type: "h3",
                                    attributes: {
                                      classList:
                                        "text-xl font-bold w-fit mx-auto sm:mx-0",
                                      style: {
                                        color: COLORS.principal_color,
                                      },
                                      innerHTML: listItem.name,
                                    },
                                  },
                                  {
                                    type: "p",
                                    attributes: {
                                      classList:
                                        "text-sm px-4 border-b w-fit mx-auto sm:mx-0 sm:pl-0",
                                      style: {
                                        borderColor: COLORS.principal_color,
                                      },
                                      innerHTML: listItem.title,
                                    },
                                  },
                                ],
                              },
                              {
                                type: "p",
                                attributes: {
                                  classList: "text-justify sm:text-left",
                                  innerHTML: listItem.message,
                                },
                              },
                            ],
                          },
                        ],
                      },
                    ],
                  },
                ],
              })),
            },
          ],
        },
      };
  }
};

getCertificatesStructure = (item) => {
  return [
    item.list.length > 0 && {
      type: "div",
      attributes: {
        classList: "py-4 space-y-2",
      },
      children: [
        item.title && {
          type: "h1",
          attributes: {
            classList: "space-y-3 text-center",
            innerHTML: item.title,
          },
        },
        {
          type: "div",
          attributes: {
            classList: "flex flex-wrap gap-4 justify-center",
          },
          children: item.list.map((listItem) => ({
            type: "picture",
            children: [
              {
                type: "source",
                attributes: {
                  srcset: "assets/images/certificates/" + listItem.src,
                },
              },
              {
                type: "img",
                attributes: {
                  classList: "w-auto h-24",
                },
              },
            ],
          })),
        },
      ],
    },
  ];
};

getFooterStructure = (item) => {
  return [
    {
      type: "div",
      attributes: {
        style: item.style,
      },
      children: [
        {
          type: "div",
          attributes: {
            classList: "container py-4 space-y-2",
          },
          children: [
            {
              type: "div",
              attributes: {
                classList: `flex flex-col sm:flex-row ${
                  companyData.logo ? "justify-between" : "justify-center"
                }`,
              },
              children: [
                companyData.logo && {
                  type: "div",
                  children: [
                    {
                      type: "picture",
                      children: [
                        {
                          type: "source",
                          attributes: {
                            srcset: "assets/images/logo.webp",
                          },
                        },
                        {
                          type: "img",
                          attributes: {
                            classList: "w-auto h-20 mx-auto sm:mx-0",
                          },
                        },
                      ],
                    },
                    companyData.contact.logoText && {
                      type: "div",
                      attributes: {
                        classList: "h-[1px] w-12 bg-white mt-2 mx-auto sm:mx-0",
                      },
                    },
                    {
                      type: "p",
                      attributes: {
                        classList: "italic text-center sm:text-left",
                        innerHTML: companyData.contact.logoText,
                      },
                    },
                  ],
                },
                {
                  type: "div",
                  attributes: {
                    classList:
                      "flex flex-col sm:flex-row text-center mt-8 sm:text-left sm:mt-0 gap-4",
                  },
                  children: [
                    {
                      type: "div",
                      attributes: {
                        classList: !companyData.logo ? "text-center" : "",
                      },
                      children: [
                        (companyData.contact.pointOfContact ||
                          companyData.contact.phone ||
                          companyData.contact.email) && {
                          type: "p",
                          attributes: {
                            classList: "font-bold text-xl",
                            innerHTML: "Get in touch",
                          },
                        },
                        companyData.contact.pointOfContact && {
                          type: "p",
                          attributes: {
                            classList: `flex gap-2 justify-center${companyData.logo ? "sm:justify-start" : ""}`,
                          },
                          children: [
                            {
                              type: "span",
                              children: [
                                {
                                  type: "i",
                                  attributes: {
                                    classList: "fa-solid fa-user",
                                  },
                                },
                              ],
                            },
                            {
                              type: "span",
                              attributes: {
                                innerHTML: companyData.contact.pointOfContact,
                              },
                            },
                          ],
                        },
                        companyData.contact.phone && {
                          type: "p",
                          attributes: {
                            classList: `flex gap-2 justify-center${companyData.logo ? "sm:justify-start" : ""}`,
                          },
                          children: [
                            {
                              type: "span",
                              children: [
                                {
                                  type: "i",
                                  attributes: {
                                    classList: "fa-solid fa-phone",
                                  },
                                },
                              ],
                            },
                            {
                              type: "span",
                              attributes: {
                                innerHTML: companyData.contact.phone,
                              },
                            },
                          ],
                        },
                        companyData.contact.email && {
                          type: "p",
                          attributes: {
                            classList: `flex gap-2 justify-center${companyData.logo ? "sm:justify-start" : ""}`,
                          },
                          children: [
                            {
                              type: "span",
                              children: [
                                {
                                  type: "i",
                                  attributes: {
                                    classList: "fa-solid fa-envelope",
                                  },
                                },
                              ],
                            },
                            {
                              type: "span",
                              attributes: {
                                innerHTML: companyData.contact.email,
                              },
                            },
                          ],
                        },
                      ],
                    },
                    companyData.contact.social.length > 0 && {
                      type: "div",
                      attributes: {
                        classList: "w-[100px]",
                      },
                      children: [
                        {
                          type: "p",
                          attributes: {
                            classList: "text-xl w-full font-bold mb-2 text-center",
                            innerHTML: "Follow us",
                          },
                        },
                        {
                          type: "div",
                          attributes: {
                            classList:
                              "flex gap-y-2 w-full justify-center sm:justify-start flex-wrap",
                          },
                          children: [
                            ...companyData.contact.social.map((social) => ({
                              type: "div",
                              attributes: {
                                classList: "w-[calc(33%)] text-center relative"
                              },
                              children: [
                                {
                                  type: "a",
                                  attributes: {
                                    classList: "text-xl peer",
                                    href: social.link,
                                    target: "_blank",
                                  },
                                  children: [
                                    {
                                      type: "i",
                                      attributes: {
                                        classList: social.icon,
                                      },
                                    },
                                  ],
                                },
                                {
                                  type: "div",
                                  attributes: {
                                    classList: "arrow-bottom mb-1 absolute bottom-full left-1/2 -translate-x-1/2 hidden peer-hover:block animate-[fade-in_300ms_ease]",
                                    style: {
                                      "--arrow-color": "white",
                                      "--arrow-size": "5px"
                                    }
                                  },
                                  children: [
                                    {
                                      type: "div",
                                      attributes: {
                                        classList: "bg-white rounded shadow py-0.5 px-1",
                                      },
                                      children: [
                                        {
                                          type: "p",
                                          attributes: {
                                            classList: "text-black text-xs",
                                            innerHTML: social.name,
                                          },
                                        },
                                      ],
                                    },
                                  ]
                                }
                              ]
                            })),
                          ],
                        },
                      ],
                    },
                  ],
                },
              ],
            },
            {
              type: "div",
              children: [
                companyData.contact.address && {
                  type: "p",
                  attributes: {
                    classList: "flex gap-2 justify-center",
                  },
                  children: [
                    {
                      type: "a",
                      attributes: {
                        classList: "flex gap-2 items-center",
                        href: `https://www.google.com/maps/search/${companyData.contact.address}`,
                        target: "_blank",
                      },
                      children: [
                        {
                          type: "i",
                          attributes: {
                            classList: "fa-solid fa-location-dot",
                          },
                        },
                        {
                          type: "span",
                          attributes: {
                            innerHTML: "&nbsp;",
                          },
                        },
                        {
                          type: "span",
                          attributes: {
                            innerHTML: companyData.contact.address,
                          },
                        },
                      ],
                    },
                  ],
                },
                {
                  type: "p",
                  attributes: {
                    classList:
                      "text-center border-t-[1px] border-white pt-2 mt-2",
                    innerHTML: `&copy; {{new Date().getFullYear()}} Federal Government Advisors`,
                  },
                },
              ],
            },
          ],
        },
      ],
    },
  ];
};
