import type { Metadata } from "next";
import Link from "next/link";
import { Container } from "../components/layout/Container";
import { MailOpenIcon, MapPin, PhoneIcon } from "lucide-react";
import Image from "next/image";

import { textCopy, contactInfoData } from "./_data/contact-data";
import heroImg from "./_assets/contact-us-hero-banner.png";
import Heading from "../components/ui/Heading";
import ContactForm from "./_components/ContactForm";

export const metadata: Metadata = {
  title: "Contact - Basmati Pakistan",
  description:
    "Feel free to get in touch Leave your message Don't hesitate to contact us Address Main Office: Office # 1, 1st Floor, Sheikh Ehsan Building, Edward Road, Lahore – Punjab, Pakistan Sargodha Office: Hospital Road Shah Nikdur Tehsil Sillanwali District Sargodha – Punjab Pakistan. Address Factory Address: Baba Saraj Rice Export Processing Mills, 26 km […]",
  alternates: {
    canonical: "https://basmatipakistan.com/contact/",
  },
  openGraph: {
    title: "Contact - Basmati Pakistan",
    description:
      "Feel free to get in touch Leave your message Don't hesitate to contact us Address Main Office: Office # 1, 1st Floor, Sheikh Ehsan Building, Edward Road, Lahore – Punjab, Pakistan Sargodha Office: Hospital Road Shah Nikdur Tehsil Sillanwali District Sargodha – Punjab Pakistan. Address Factory Address: Baba Saraj Rice Export Processing Mills, 26 km […]",
    url: "https://basmatipakistan.com/contact/",
    type: "website",
  },
  twitter: {
    card: "summary_large_image",
    title: "Contact - Basmati Pakistan",
    description:
      "Feel free to get in touch Leave your message Don't hesitate to contact us Address Main Office: Office # 1, 1st Floor, Sheikh Ehsan Building, Edward Road, Lahore – Punjab, Pakistan Sargodha Office: Hospital Road Shah Nikdur Tehsil Sillanwali District Sargodha – Punjab Pakistan. Address Factory Address: Baba Saraj Rice Export Processing Mills, 26 km […]",
  },
};

export default function ContactPage() {
  return (
    <>
      <section className="relative h-[80vh] w-full">
        <Image
          src={heroImg}
          alt="Contact Us Hero"
          fill
          placeholder="blur"
          className="absolute top-0 left-0 w-full h-full object-cover object-center"
          priority
          fetchPriority="high"
          loading="eager"
        />
        <div className="relative bg-black/60 w-full h-full flex items-center">
          <Container>
            <Heading as="h1" variant="title" className="text-white text-center">
              {textCopy.heroTitle}
            </Heading>
          </Container>
        </div>
        <div className="absolute z-10 bottom-0 w-full bg-white h-24 [clip-path:polygon(100%_100%,100%_0,0_100%)]"></div>
      </section>
      <section>
        <Container>
          <div className="flex flex-col lg:flex-row gap-12">
            <div className="w-full lg:w-1/2 z-20 py-32 bg-white relative -top-56 rounded-lg px-12 border border-gray-200">
              <Heading as="h2" variant="subsection" className="text-primary">
                {textCopy.formHeadline}
              </Heading>
              <ContactForm />
            </div>
            <div className="w-full lg:w-1/2">
              <Heading as="h2" variant="section" className="text-primary">
                {textCopy.contactHeadline}
              </Heading>
              <ul className="mt-8 flex flex-col gap-8">
                <li className="flex gap-6 border border-gray-200 rounded-xl p-6 group transform hover:-translate-y-1 transition-all duration-500 hover:shadow-lg overflow-hidden">
                  <div className="bg-[#198A2121] h-fit w-fit p-3 rounded-full">
                    <MapPin size={30} className="text-primary" />
                  </div>
                  <div>
                    <Heading as="h4" variant="card" className="text-primary">
                      {contactInfoData.addressHeadline}
                    </Heading>
                    {contactInfoData.addresses.map((addr, idx) => (
                      <p key={idx} className="text-gray-600 pb-1">
                        <span className="font-semibold">{addr.label}: </span>{" "}
                        {addr.text}
                      </p>
                    ))}
                  </div>
                </li>
                <li className="border border-gray-200 rounded-xl p-6 group transform hover:-translate-y-1 transition-all duration-500 hover:shadow-lg overflow-hidden">
                  <Link
                    href={`tel:${contactInfoData.phone}`}
                    className="flex gap-6"
                  >
                    <div className="bg-[#FF983C21] h-fit w-fit p-3 rounded-full">
                      <PhoneIcon
                        size={26}
                        fill="#FFAA2B"
                        className="text-[#FFAA2B]"
                        strokeWidth={0}
                      />
                    </div>
                    <div>
                      <Heading as="h4" variant="card" className="text-primary">
                        Phone
                      </Heading>
                      <p className="text-gray-600">{contactInfoData.phone}</p>
                    </div>
                  </Link>
                </li>
                <li className="border border-gray-200 rounded-xl p-6 group transform hover:-translate-y-1 transition-all duration-500 hover:shadow-lg overflow-hidden">
                  <Link
                    href={`mailto:${contactInfoData.email}`}
                    className="flex gap-6"
                  >
                    <div className="bg-[#DDFFED] h-fit w-fit p-3 rounded-full">
                      <MailOpenIcon
                        size={30}
                        fill="#33CC1E"
                        className="text-[#33CC1E]"
                        strokeWidth={1}
                        stroke="#DDFFED"
                      />
                    </div>
                    <div>
                      <Heading as="h4" variant="card" className="text-primary">
                        Email
                      </Heading>
                      <p className="text-gray-600">{contactInfoData.email}</p>
                    </div>
                  </Link>
                </li>
              </ul>
            </div>
          </div>
        </Container>
      </section>
    </>
  );
}
