import { Head, Link } from '@inertiajs/react';
import { ArrowRight, Clock } from 'lucide-react';
import PublicPageHeader from '@/components/landing/public-page-header';
import Reveal from '@/components/landing/reveal';
import { complaints } from '@/routes';

const contactChannels = [
    {
        label: 'Opening hours',
        value: 'Monday – Friday, 8:00 am – 5:00 pm (WAT)',
        icon: Clock,
    },
] as const;

export default function Contact() {
    return (
        <>
            <Head title="Contact" />

            <PublicPageHeader
                kicker="Contact"
                title="We’re here to help."
                intro="Questions about membership, a savings plan or a financing application? Our member support team is here to help during opening hours."
            />

            <section className="px-5 py-16 sm:px-6 lg:px-10 lg:py-20">
                <div className="mx-auto w-full max-w-6xl">
                    <ul className="grid max-w-sm gap-5">
                        {contactChannels.map(
                            ({ label, value, icon: Icon }, index) => (
                                <li key={label}>
                                    <Reveal
                                        delay={index * 100}
                                        className="h-full rounded-landing-lg border border-surface-200 bg-white p-6 shadow-landing-sm"
                                    >
                                        <span className="mb-5 flex size-10 items-center justify-center rounded-landing bg-brand-faint text-brand">
                                            <Icon
                                                className="size-5"
                                                aria-hidden="true"
                                            />
                                        </span>
                                        <h2 className="mb-1.5 text-xs font-semibold tracking-[0.14em] text-ink-400 uppercase">
                                            {label}
                                        </h2>
                                        <p className="text-[15px] leading-normal font-semibold text-ink">
                                            {value}
                                        </p>
                                    </Reveal>
                                </li>
                            ),
                        )}
                    </ul>

                    <Reveal className="mt-10 flex flex-col gap-4 rounded-landing-lg bg-ink p-7 sm:flex-row sm:items-center sm:justify-between lg:p-8">
                        <div>
                            <h2 className="font-display text-xl font-semibold text-white">
                                Not happy with our service?
                            </h2>
                            <p className="mt-1 text-sm text-white/60">
                                Our complaints process explains how we handle
                                and resolve concerns.
                            </p>
                        </div>
                        <Link
                            href={complaints()}
                            className="inline-flex items-center gap-2 self-start rounded-full bg-white px-5 py-3 text-sm font-semibold text-ink transition-colors hover:bg-surface-100 sm:self-auto"
                        >
                            Make a complaint
                            <ArrowRight
                                className="size-3.5"
                                aria-hidden="true"
                            />
                        </Link>
                    </Reveal>
                </div>
            </section>
        </>
    );
}
