import Image from "next/image"; import Link from "next/link"; import { JsonLd } from "@/components/json-ld"; import { ProjectCard } from "@/components/project-card"; import { SectionHeading } from "@/components/section-heading"; import { SiteShell } from "@/components/site-shell"; import { getBasePath, getDirection, getResumePath, portfolioContent, resumeFile, sharedProfile, type Language, } from "@/data/portfolio"; import { getHomeStructuredData } from "@/data/seo"; export function HomePage({ language }: { language: Language }) { const dir = getDirection(language); const t = portfolioContent[language]; const founderName = language === "ar" ? sharedProfile.founderNameAr : sharedProfile.founderNameEn; const address = language === "ar" ? sharedProfile.addressAr : sharedProfile.address; const structuredData = getHomeStructuredData(language); const heroImageAlt = language === "ar" ? "لوحة بورتفوليو لمجمع إعلامي ومبنى التلفزيون" : "Portfolio board for Media Complex and TV Building"; const basePath = getBasePath(language); const resumePath = getResumePath(language); const hasResume = resumeFile.available; const contactCards = [ { kind: "phone", label: t.ui.phone, value: sharedProfile.phone, href: `tel:${sharedProfile.phone.replace(/\s+/g, "")}`, }, { kind: "whatsapp", label: t.ui.whatsapp, value: sharedProfile.phone, href: sharedProfile.whatsappHref, }, { kind: "email", label: t.ui.email, value: sharedProfile.email, href: `mailto:${sharedProfile.email}`, wide: true, }, { kind: "location", label: t.ui.basedIn, value: address, href: sharedProfile.locationHref }, { kind: "facebook", label: t.ui.facebook, value: sharedProfile.facebook, href: sharedProfile.facebookHref }, ]; const hasWideContactCard = contactCards.some((item) => item.wide); return (

{t.ui.editorialPortfolio}

{founderName}

{t.ui.architectureEngineer}

{t.hero.subtitle} . {t.hero.supportingLine}

{t.hero.intro}

{t.ui.viewProjects} {hasResume ? ( {t.ui.downloadCv} ) : ( {t.ui.onlineResume} )}
{heroImageAlt}

{t.ui.profile}

{t.hero.profileBlurb}

{t.hero.featuredProjectTitle}

{t.featured.projects[0]?.location ?? address}

{t.hero.featuredProjectText}

{t.about.paragraphs.map((paragraph) => (

{paragraph}

))}

{t.ui.designPhilosophy}

"{t.philosophy.quote}"

{t.ui.materialsMood}

{t.philosophy.body}

{t.philosophy.tags.map((item) => ( {item} ))}
{t.sectors.categories.map((category, index) => (

{String(index + 1).padStart(2, "0")}

{category}

))}
{t.featured.projects.map((project, index) => ( ))}
{t.awards.items.map((award, index) => (

{String(index + 1).padStart(2, "0")}

{award.year}

{award.title}

{award.description}

))}

{t.ui.coreSkills}

{t.craft.skills.map((skill) => ( {skill} ))}

{t.ui.software}

{t.craft.software.map((tool) => ( {tool} ))}

{t.ui.documentation}

{t.craft.documentationText}

{t.ui.visualization}

{t.craft.visualizationText}

{t.craft.additionalProjects.map((project) => (

{project.year}

{project.title}

{project.type}

{project.location}

))}

{t.ui.onlineResume}

{t.ui.viewFullResume}

{hasResume ? (

{t.ui.pdfDownload}

{t.ui.downloadCv}

) : (

{t.ui.pdfDownload}

{t.ui.downloadCv}

{t.ui.resumeUnavailable}

)}
{t.metrics.map((metric) => (

{metric.value}

{metric.label}

))}

{t.ui.contact}

{t.ui.letsCreate}

{t.ui.availableFor}

{contactCards.map((item, index) => { const shouldSpan = item.wide || (!hasWideContactCard && contactCards.length % 2 === 1 && index === contactCards.length - 1); const isEmail = item.kind === "email"; const isPhoneValue = item.kind === "phone" || item.kind === "whatsapp"; const isLtrValue = isEmail || isPhoneValue; const content = (

{item.label}

{item.value}

); const cardClass = `contact-card ${shouldSpan ? "md:col-span-2" : ""}`; return item.href ? ( {content} ) : (
{content}
); })}
); }