"use client" import { AnimatePresence, motion } from "motion/react" import { useEffect, useState } from "react" import { ArrowRightIcon, BedDoubleIcon, ChevronLeftIcon, ChevronRightIcon, MapPinIcon, RulerIcon, SearchIcon } from "lucide-react" import { cn } from "@/lib/utils" import type { TemplateProps } from "../../lib/types" import { DemoForm } from "../shared/demo-form" import { TField, TSelect } from "../shared/fields" import { TImage } from "../shared/media" import { ParallaxImage, Reveal, RevealWords, ease, useScrollNav } from "../shared/motion" import { TemplateShell } from "../shared/shell" import { immobilien, type ImmobilienData } from "./definition" import { fonts } from "./fonts" const em = "italic text-t-accent" const container = "mx-auto w-full max-w-[1400px] px-5 md:px-10" const heading = "font-t-display font-normal tracking-[-0.01em]" const label = "text-[11px] uppercase tracking-[0.3em]" const TYPES = ["Alle", "Kaufen", "Mieten"] const ALL_PLACES = "Alle Lagen" function Eyebrow({ children }: { children: string }) { return (

{children}

) } export function ImmobilienTemplate({ content }: TemplateProps) { const { brand, hero, slides, listings, about, projects, valuation, testimonial } = content.data const show = (key: string) => !content.hidden.includes(key) const [type, setType] = useState("Alle") const [place, setPlace] = useState(ALL_PLACES) const places = [ALL_PLACES, ...new Set(listings.items.map((item) => item.location))] const links = [ { href: "#objekte", label: "Objekte", visible: show("listings") }, { href: "#ueber-uns", label: "Über uns", visible: show("about") }, { href: "#referenzen", label: "Referenzen", visible: show("projects") }, { href: "#bewertung", label: "Wertermittlung", visible: true }, ].filter((link) => link.visible) return (