import Link from "next/link";
import Logo from "./Logo";

const groups = [
  {
    title: "PUBLIC",
    links: [
      { label: "About us", href: "/about" },
      { label: "Events", href: "/events" },
      { label: "News", href: "/knowledge" },
      { label: "Gallery", href: "/gallery" },
      { label: "Knowledge", href: "/knowledge" },
      { label: "Get Your Portal", href: "/why-join" },
    ],
  },
  {
    title: "TRUST",
    links: [
      { label: "Privacy", href: "#" },
      { label: "Consent", href: "#" },
      { label: "Contact", href: "/contact" },
      { label: "Member Login", href: "/why-join" },
      { label: "Sponsor", href: "#" },
      { label: "Blog", href: "/knowledge" },
    ],
  },
];

function Social({ d }: { d: string }) {
  return (
    <span className="footer__social">
      <svg width="13" height="13" viewBox="0 0 24 24" fill="currentColor">
        <path d={d} />
      </svg>
    </span>
  );
}

export default function Footer() {
  return (
    <footer className="footer">
      <div className="container footer__grid">
        <div className="footer__brand">
          <Logo size={40} variant="light" />
          <p className="footer__about">
            UP Parivaar Dallas public portal prototype powered by Insignia TOWER.
            Replace sample content with committee-approved live copy before launch.
          </p>
          <p className="footer__disclaimer">
            Disclaimer: The services provided are for wellness purposes only and are
            not a substitute for medical treatment.
          </p>
        </div>

        {groups.map((g) => (
          <div key={g.title}>
            <h4 className="footer__heading">{g.title}</h4>
            <ul className="footer__list">
              {g.links.map((l) => (
                <li key={l.label}>
                  <Link href={l.href} className="footer__link">
                    {l.label}
                  </Link>
                </li>
              ))}
            </ul>
          </div>
        ))}

        <div>
          <h4 className="footer__heading">CONTACT INFO</h4>
          <ul className="footer__contact">
            <li className="footer__contact-item">
              <span className="footer__icon">◉</span>
              9300 John Hickman Pkwy, Building -3, Suite #302, Frisco-TX-75035
            </li>
            <li className="footer__contact-item footer__contact-item--center">
              <span className="footer__icon">✆</span> 973-710-2714
            </li>
            <li className="footer__contact-item footer__contact-item--center">
              <span className="footer__icon">✉</span> info@upparivaardallas.com
            </li>
            <li className="footer__contact-web">upparivaardallas.com</li>
          </ul>
        </div>
      </div>

      <div className="footer__bottom">
        <div className="container footer__bottom-inner">
          <p className="footer__copy">
            © 2026 UP Parivar Dallas · Powered by Insignia
          </p>
          <div className="footer__socials">
            <Social d="M13.5 21v-8h2.7l.4-3h-3.1V8.1c0-.9.3-1.5 1.5-1.5H17V3.9c-.3 0-1.3-.1-2.4-.1-2.4 0-4 1.5-4 4.1V10H8v3h2.6v8h2.9Z" />
            <Social d="M6.94 6.5a1.94 1.94 0 1 1-3.88 0 1.94 1.94 0 0 1 3.88 0ZM3.3 8.4h3.28V21H3.3V8.4Zm5.35 0h3.14v1.72h.05c.44-.83 1.5-1.7 3.1-1.7 3.3 0 3.9 2.17 3.9 5V21h-3.27v-4.4c0-1.05-.02-2.4-1.46-2.4-1.47 0-1.7 1.14-1.7 2.32V21H8.65V8.4Z" />
            <Social d="M12 2.2c3.2 0 3.6 0 4.85.07 1.17.05 1.8.25 2.23.42.56.22.96.48 1.38.9.42.42.68.82.9 1.38.17.42.37 1.06.42 2.23.06 1.27.07 1.65.07 4.85s0 3.58-.07 4.85c-.05 1.17-.25 1.8-.42 2.23-.22.56-.48.96-.9 1.38-.42.42-.82.68-1.38.9-.42.17-1.06.37-2.23.42-1.27.06-1.65.07-4.85.07s-3.58 0-4.85-.07c-1.17-.05-1.8-.25-2.23-.42a3.7 3.7 0 0 1-1.38-.9 3.7 3.7 0 0 1-.9-1.38c-.17-.42-.37-1.06-.42-2.23C2.2 15.58 2.2 15.2 2.2 12s0-3.58.07-4.85c.05-1.17.25-1.8.42-2.23.22-.56.48-.96.9-1.38.42-.42.82-.68 1.38-.9.42-.17 1.06-.37 2.23-.42C8.42 2.2 8.8 2.2 12 2.2Zm0 4.9a4.9 4.9 0 1 0 0 9.8 4.9 4.9 0 0 0 0-9.8Zm0 8.08a3.18 3.18 0 1 1 0-6.36 3.18 3.18 0 0 1 0 6.36Zm6.24-8.28a1.14 1.14 0 1 1-2.29 0 1.14 1.14 0 0 1 2.29 0Z" />
            <Social d="M18.9 2H22l-6.9 7.9L23 22h-6.4l-5-6.6L5.8 22H2.7l7.4-8.5L1.7 2h6.5l4.6 6.1L18.9 2Zm-1.1 18h1.7L7.3 3.7H5.5L17.8 20Z" />
            <Social d="M22 7.2s-.2-1.4-.8-2c-.8-.8-1.7-.8-2.1-.9C16.2 4.1 12 4.1 12 4.1h0s-4.2 0-7.1.2c-.4 0-1.3.1-2.1.9-.6.6-.8 2-.8 2S1.8 8.8 1.8 10.5v1.6c0 1.6.2 3.3.2 3.3s.2 1.4.8 2c.8.8 1.8.8 2.3.9 1.7.2 7 .2 7 .2s4.2 0 7.1-.2c.4 0 1.3-.1 2.1-.9.6-.6.8-2 .8-2s.2-1.6.2-3.3v-1.6c0-1.6-.2-3.3-.2-3.3ZM10 14.6V8.9l4.9 2.9-4.9 2.8Z" />
          </div>
        </div>
      </div>
    </footer>
  );
}
