/* global React */
/* DDPP Buchungen — shared layout components */
function TopBar() {
const mapsUrl = "https://maps.google.com/?q=Danziger+Str.+6,+10435+Berlin";
const appStoreUrl = "https://apps.apple.com/de/app/ding-dong-ping-pong/id6743864131";
const playStoreUrl = "https://play.google.com/store/apps/details?id=com.dingdongpingpong.app";
return (
);
}
function Header({ active }) {
const bookingUrl = "https://dingdongpingpong.podplay.app/book";
return (
);
}
function Ticker({ words }) {
const items = words || ["DING", "·", "DONG", "·", "FIRMENFEIER", "·", "GEBURTSTAG", "·", "TURNIER", "·", "SCHMETTERN", "·"];
const doubled = [...items, ...items, ...items];
return (
{doubled.map((w, i) =>
{w}
)}
);
}
function FooterCTA({ heading, sub, cta, ctaHref }) {
const bookingUrl = "https://dingdongpingpong.podplay.app/book";
const href = ctaHref || bookingUrl;
const isExternal = /^https?:/.test(href);
return (
{heading || <>DING DONG!
ZEIT FÜR'S EVENT!>}
{sub || "Klick auf den Button, wähle Datum und Uhrzeit — der Rest geht im Buchungstool."}
{cta || "Tisch buchen →"}
);
}
function Footer() {
const mapsUrl = "https://maps.google.com/?q=Danziger+Str.+6,+10435+Berlin";
const appStoreUrl = "https://apps.apple.com/de/app/ding-dong-ping-pong/id6743864131";
const playStoreUrl = "https://play.google.com/store/apps/details?id=com.dingdongpingpong.app";
return (
);
}
/* Booking widget placeholder — wired up later to real tool */
function BookingWidget({ defaultAnlass, onSubmit }) {
const [anlass, setAnlass] = React.useState(defaultAnlass || "Firmenfeier");
const [people, setPeople] = React.useState(12);
const [date, setDate] = React.useState("");
const [time, setTime] = React.useState("19:00");
const [duration, setDuration] = React.useState("3 Std.");
const [name, setName] = React.useState("");
const [email, setEmail] = React.useState("");
const handle = (e) => {
e.preventDefault();
onSubmit && onSubmit({ anlass, people, date, time, duration, name, email });
};
return (
);
}
Object.assign(window, { TopBar, Header, Ticker, FooterCTA, Footer, BookingWidget });