import ListYourPropertyForm from "@/app/components/list-your-property/ListYourPropertyForm"
import Container from "@/app/components/shared/container"
import { HeaderWrwpper } from "@/app/components/shared/main-header"
import { Icon } from "@iconify/react"
import { Metadata } from "next"
import { getTranslations } from "next-intl/server"

interface LayoutProps {
    params: Promise<{ locale: string | any }> // Handle both promise and object
}
export async function generateMetadata() : Promise<Metadata> {
    const t = await getTranslations("meta")
    return{
           title: t("listProperty.title"),
           description: t("listProperty.description"),
    }
} 
export default async function ListYourPropertyPage({ params }: LayoutProps) {
    const { locale } = await params
    const t = await getTranslations("Header")

    return (
        <div className="pt-1">
            <HeaderWrwpper imgUrl="/header.png">
                <div className="flex flex-col items-center justify-center h-full w-full">
                    <div 
                        className="flex flex-col gap-6"
                        data-aos="fade-up"
                        data-aos-duration="800"
                    >
                        <h1 className="text-[40px] font-medium text-center">{t("List Your Property")}</h1>
                        <div className="text-[14px] text-center font-[300px] flex items-center justify-center gap-2">
                            {t("Home")} <Icon className="text-2xl text-[#fff]" icon="weui:arrow-filled" />{" "}
                            {t("List Your Property")}
                        </div>
                    </div>
                </div>
            </HeaderWrwpper>

            <Container className="mt-10 lg:mt-24">
                <div data-aos="fade-up" data-aos-duration="800" data-aos-delay="100">
                    <ListYourPropertyForm />
                </div>
            </Container>
        </div>
    )
}
