"use client"
import { AnimatePresence, motion } from "motion/react"
import { useState, type InputHTMLAttributes } from "react"
import { ArrowRightIcon } from "lucide-react"
import { cn } from "@/lib/utils"
import type { TemplateProps } from "../../lib/types"
import { DemoForm } from "../shared/demo-form"
import { ParallaxImage, Reveal, RevealWords, ease, useScrollNav } from "../shared/motion"
import { TImage } from "../shared/media"
import { TemplateShell } from "../shared/shell"
import { kanzlei, type KanzleiData } from "./definition"
import { fonts } from "./fonts"
const em = "italic text-t-accent"
const container = "mx-auto w-full max-w-[1320px] px-6 md:px-10"
const heading = "font-t-display font-medium tracking-[-0.015em]"
function Eyebrow({ children, className }: { children: string; className?: string }) {
return (
{children}
)
}
export function KanzleiTemplate({ content }: TemplateProps) {
const { brand, hero, areas, about, team, steps, quotes, contact } = content.data
const show = (key: string) => !content.hidden.includes(key)
const links = [
{ href: "#kompetenzen", label: "Kompetenzen", visible: show("areas") },
{ href: "#ueber-uns", label: "Über uns", visible: show("about") },
{ href: "#team", label: "Team", visible: show("team") },
{ href: "#kontakt", label: "Kontakt", visible: true },
].filter((link) => link.visible)
return (
{hero.eyebrow}
{hero.text}
{hero.facts.map((fact, i) => (
0 && "sm:border-l sm:border-t-fg/15")}>
- {fact.label}
- {fact.value}
- {fact.label}
))}
{show("areas") && }
{show("about") && (
{about.lead}
{about.text}
)}
{show("team") && (
{team.eyebrow}
{team.members.map((member, i) => (
{member.name}
{member.role}
))}
)}
{show("steps") && (
{steps.eyebrow}
{steps.items.map((step, i) => (
{i + 1}
{step.title}
{step.text}
))}
)}
{show("quotes") && (
{quotes.items.map((quote, i) => (
„{quote.text}“
{quote.author}
))}
)}
{contact.eyebrow}
{contact.text}
{[
["Adresse", contact.address],
["Telefon", contact.phone],
["E-Mail", contact.email],
["Bürozeiten", contact.hours],
].map(([label, value]) => (
- {label}
- {value}
))}
Vielen Dank.
Wir melden uns innerhalb eines Werktags bei Ihnen.
}
>
Ihre Anfrage
)
}
function Nav({ brand, cta, links }: { brand: KanzleiData["brand"]; cta: string; links: { href: string; label: string }[] }) {
const { scrolled, hidden } = useScrollNav()
return (
)
}
function Areas({ areas }: { areas: KanzleiData["areas"] }) {
const [open, setOpen] = useState(0)
return (
{areas.eyebrow}
{areas.text}
{areas.items.map((item, i) => {
const isOpen = open === i
return (
-
{isOpen && (
{item.text}
)}
)
})}
)
}
function Box({ label, className, ...props }: InputHTMLAttributes & { label: string }) {
return (
)
}