import { useWeb } from "@/pages/web/WebContext";
import { Container } from "@/pages/web/WebUI";
import { BrandLogo } from "@/components/base/BrandLogo";
import type { WebScreen } from "@/pages/web/types";

const QUICK: { label: string; screen: WebScreen }[] = [
  { label: "الرئيسية", screen: "invHome" },
  { label: "المنشآت", screen: "businesses" },
  { label: "الفرص الاستثمارية", screen: "invOpps" },
  { label: "المتابعة", screen: "invFollowing" },
];

export default function InvFooter() {
  const { jump } = useWeb();

  return (
    <footer className="bg-primary-950 text-background-50 border-t-[3px] border-secondary-500">
      <Container className="py-14">
        <div className="grid grid-cols-1 md:grid-cols-12 gap-10">
          <div className="md:col-span-5">
            <div className="flex items-center gap-2.5 mb-4">
              <BrandLogo className="w-[50px] h-[36px] text-background-50" />
              <span className="font-heading font-bold text-[19px]">دشن</span>
            </div>
            <p className="text-[13.5px] leading-relaxed text-background-50/70 max-w-md">
              منصة دشن الرقمية — تربط المستثمرين بالمنشآت والفرص الاستثمارية الواعدة في مختلف القطاعات.
            </p>
            <div className="flex items-center gap-2 mt-6">
              {["ri-twitter-x-line", "ri-instagram-line", "ri-linkedin-line", "ri-whatsapp-line"].map(
                (ic) => (
                  <a
                    key={ic}
                    href="#"
                    onClick={(e) => e.preventDefault()}
                    aria-label={ic}
                    className="w-9 h-9 rounded-full bg-background-50/10 flex items-center justify-center text-background-50/90 hover:bg-background-50/20 transition-colors cursor-pointer"
                  >
                    <i className={`${ic} text-[17px] leading-none`} />
                  </a>
                ),
              )}
            </div>
          </div>

          <div className="md:col-span-3">
            <h4 className="text-[14px] font-bold mb-4">روابط سريعة</h4>
            <ul className="space-y-2.5">
              {QUICK.map((q) => (
                <li key={q.label}>
                  <button
                    type="button"
                    onClick={() => jump(q.screen)}
                    className="text-[13.5px] text-background-50/70 hover:text-background-50 cursor-pointer transition-colors"
                  >
                    {q.label}
                  </button>
                </li>
              ))}
            </ul>
          </div>

          <div className="md:col-span-4">
            <h4 className="text-[14px] font-bold mb-4">تواصل معنا</h4>
            <ul className="space-y-3 text-[13.5px] text-background-50/70">
              <li className="flex items-center gap-2.5">
                <i className="ri-mail-line text-[16px] leading-none" />
                <span dir="ltr">hello@dshn.sa</span>
              </li>
              <li className="flex items-center gap-2.5">
                <i className="ri-phone-line text-[16px] leading-none" />
                <span dir="ltr">+966 800 123 4567</span>
              </li>
              <li className="flex items-center gap-2.5">
                <i className="ri-map-pin-line text-[16px] leading-none" />
                <span>الرياض، المملكة العربية السعودية</span>
              </li>
            </ul>
          </div>
        </div>

        <div className="mt-12 pt-6 border-t border-background-50/15 flex flex-col sm:flex-row items-center justify-between gap-3">
          <p className="text-[12.5px] text-background-50/60">
            © 2025 دشن — جميع الحقوق محفوظة
          </p>
          <p className="text-[12.5px] text-background-50/60 flex items-center gap-2">
            <i className="ri-global-line text-[15px] leading-none" />
            المملكة العربية السعودية · ر.س
          </p>
        </div>
      </Container>
    </footer>
  );
}