1import{j as e,S as Z,a as K,R as Y,r as F,g as J}from"./index-BwlpUMBf.js";import{u as Q}from"./useServerFn-C7QMSxb7.js";import{B as X}from"./button-CQuG3pu7.js";import{L as m,I as _}from"./label-DYohrGye.js";import{S as ee,a as te,b as re,c as se,d as z,D as ae,T as ne}from"./DateTimePicker-C-rmXgNa.js";import{c as ie}from"./inquiries.functions-7lN68FR0.js";import{pushLeadEvent as le}from"./track-lead-DXsMhEfc.js";import{u as oe,a as ce,p as me,b as B}from"./form-tracking-CrLbG3JS.js";import{O as de}from"./ops-config-3AQ_fA41.js";import{C as E}from"./calendar-days-CNmreZI5.js";import{L as ue}from"./loader-circle-Hy0DvCJX.js";import{C as he}from"./circle-check-Bc53nl4T.js";import"./index-CGJMGMsf.js";import"./popover-DOMhF8tN.js";import"./chevron-right-B43tKEmG.js";import"./index-BI1IFMMj.js";import"./check-CbETIAv7.js";import"./clock-D-pij6Dc.js";const pe="/__l5e/assets-v1/eda7511b-acd3-4c2c-9a35-95c8767ca148/reservieren-hero-taps.jpg",ge={url:pe},xe="/__l5e/assets-v1/414495b6-c549-4f54-903d-3749b7ba6a07/reservieren-bar-interior.jpg",be={url:xe},D={bayreuth:"Pub&Go Bayreuth","prenzlauer-berg":"Pub&Go Berlin Prenzlauer Berg",fuerth:"Pub&Go Fürth"},fe={fue:"fuerth",fuerth:"fuerth","bln-pb":"prenzlauer-berg","prenzlauer-berg":"prenzlauer-berg",pb:"prenzlauer-berg",bt:"bayreuth",bayreuth:"bayreuth"};function ve(n){return n?fe[n.trim().toLowerCase()]??null:null}const je=de;function ye(n){return`${n.replace(/\D/g,"")||"noemail"}@no-email.pubandgo.local`}const f="#ffbd59",d="text-white/80 text-sm font-medium",b="w-full bg-white/5 border-white/15 text-white placeholder:text-white/40 focus-visible:ring-[#ffbd59]/60",we="w-full h-auto min-h-11 py-3 whitespace-normal text-center leading-snug bg-[#ffbd59] text-black font-bold hover:bg-[#ffcd7d] disabled:opacity-50";function Ue(){return e.jsxs("div",{className:"min-h-screen bg-black text-white",children:[e.jsx(Z,{variant:"ueber"}),e.jsxs("section",{className:"relative h-[38vh] min-h-[240px] sm:h-[50vh] sm:min-h-[320px] md:h-[62vh] w-full overflow-hidden",children:[e.jsx("img",{src:ge.url,alt:"Zapfhähne an der Theke im Pub&Go",className:"absolute inset-0 h-full w-full object-cover",loading:"eager",decoding:"async"}),e.jsx("div",{className:"absolute inset-0 bg-gradient-to-b from-black/70 via-black/50 to-black"}),e.jsx("div",{className:"relative z-10 flex h-full items-center justify-center px-4 sm:px-6",children:e.jsx("h1",{className:"text-center font-display font-bold tracking-[0.1em] sm:tracking-[0.18em] text-[clamp(1.75rem,9vw,4.5rem)] leading-tight break-words max-w-full",style:{color:f},children:"Reservierung"})})]}),e.jsx(Ne,{image:be.url,imageAlt:"Bar-Interieur im Pub&Go",imageRight:!0,children:e.jsx(Se,{})}),e.jsx(K,{})]})}function Ne({image:n,imageAlt:o,imageRight:u=!1,children:c}){const h=e.jsx("div",{className:`min-w-0 w-full overflow-hidden border border-white/10 max-w-full md:max-w-[400px] mx-auto h-[220px] sm:h-[320px] md:h-[460px] ${u?"md:order-2":""}`,children:e.jsx("img",{src:n,alt:o,className:"h-full w-full object-cover",loading:"lazy",decoding:"async"})});return e.jsx("section",{className:"bg-black py-10 sm:py-14 md:py-20",children:e.jsxs("div",{className:"max-w-6xl mx-auto px-4 sm:px-6 grid gap-6 sm:gap-8 md:gap-12 md:grid-cols-2 items-center",children:[h,e.jsx("div",{className:`min-w-0 ${u?"md:order-1":""}`,children:c})]})})}function $({icon:n,title:o,children:u}){return e.jsxs("div",{className:"min-w-0 rounded-2xl sm:rounded-3xl border border-white/10 bg-white/[0.03] backdrop-blur p-5 sm:p-6 md:p-8",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-5 sm:mb-6",children:[e.jsx("div",{className:"h-10 w-10 sm:h-11 sm:w-11 shrink-0 rounded-xl flex items-center justify-center text-black",style:{backgroundColor:f},children:n}),e.jsx("h2",{className:"min-w-0 text-xl sm:text-2xl md:text-3xl font-display font-bold text-white break-words",children:o})]}),u]})}function _e({title:n,text:o}){return e.jsxs("div",{className:"rounded-2xl border p-6 text-center",style:{borderColor:`${f}66`,backgroundColor:`${f}1a`},children:[e.jsx(he,{className:"h-10 w-10 mx-auto mb-3",style:{color:f}}),e.jsx("h3",{className:"text-xl font-semibold text-white",children:n}),e.jsx("p",{className:"mt-2 text-sm text-white/70",children:o})]})}function Se(){const n=Q(ie),o=Y.useSearch(),u=ve(o.location),[c,h]=F.useState("idle"),[T,S]=F.useState(null),[t,L]=F.useState({location:u??"prenzlauer-berg",name:"",phone:"",email:"",date:"",time:"",guests:"2"}),p=(r,s)=>L(a=>({...a,[r]:s})),v=t.location==="prenzlauer-berg",C=t.location==="fuerth",I="16:30",P="17:00",M=v?I:C?P:void 0,A=r=>v?r===2:C?r===0||r===1:!1,G=v||C?r=>A(r.getDay()):void 0,q=r=>{L(s=>{const a={...s,location:r},i=r==="prenzlauer-berg"?I:r==="fuerth"?P:null,l=g=>r==="prenzlauer-berg"?g===2:r==="fuerth"?g===0||g===1:!1,[y,w,N]=s.date?s.date.split("-").map(Number):[];return y&&w&&N&&l(new Date(y,w-1,N).getDay())&&(a.date=""),i&&s.time&&s.time<i&&(a.time=""),a})},j={formSlug:"reservierung",formName:"Tisch-Reservierung",leadSource:"reservierung",standort:D[t.location]}
1,k=(r,s,a,i)=>{if(typeof window>"u")return;const l=window;try{(l.dataLayer=l.dataLayer||[]).push({event:`reservieren_table_${r}`,party_size:s,location:t.location,...a?{error_message:a}:{}}),l.plausible?.("Reservieren Table",{props:{status:r,party_size:s,location:t.location}}),r==="success"&&le({form_id:"reservierung",submission_id:i,standort:D[t.location],email:t.email,phone:t.phone,first_name:t.name?.trim().split(/\s+/)[0],last_name:t.name?.trim().split(/\s+/).slice(1).join(" "),extra:{party_size:s}})}catch{}},O=oe(j),R=ce(),U=async r=>{if(r.preventDefault(),!!R.begin())try{await H(r)}finally{R.end()}},H=async r=>{if(r.preventDefault(),c==="submitting")return;me(j),h("submitting"),S(null);const s=Math.max(1,Math.min(100,parseInt(t.guests,10)||1));try{const a=t.date?new Date(t.date).toLocaleDateString("de-DE",{weekday:"long"}):null,i=[...t.location==="prenzlauer-berg"?["ð´ð´ð´ BERLIN PRENZLAUER BERG ð´ð´ð´"]:[],"[TISCHRESERVIERUNG]",`Standort: ${D[t.location]}`,`Wunschdatum: ${t.date}${a?` (${a})`:""}`,`Wunschzeit: ${t.time||"â"}`,`GruppengröÃe: ${s}`,"(Anfrage über pubandgo.de/reservieren, Tischreservierung)"].join(` 2`),l=new Date,y=l.getFullYear(),w=String(l.getMonth()+1).padStart(2,"0"),N=String(l.getDate()).padStart(2,"0"),g=`${y}-${w}-${N}`,V=t.date&&t.date>=g?t.date:g,W=/^\d{2}:\d{2}$/.test(t.time)?t.time:"19:00",x=await n({data:{type:"stammtisch",pub_id:je,guest_name:t.name.trim(),guest_email:t.email.trim()||ye(t.phone),guest_phone:t.phone.trim(),party_size:s,event_date:V,event_time:W,frequency:"wöchentlich",notes:i,meta:{...J(),location:t.location,form_source:"reservieren_tisch",first_name:t.name.trim().split(/\s+/)[0],last_name:t.name.trim().split(/\s+/).slice(1).join(" ")||void 0}}});x.ok?(k("success",s,void 0,x.id),h("success")):(k("error",s,x.error),B(j,{error_type:"server",error_message:x.error}),h("error"),S(x.error))}catch(a){console.error(a);const i="Reservierung konnte nicht gesendet werden. Bitte versuch es gleich nochmal.";k("error",s,i),B(j,{error_type:"server",error_message:i}),h("error"),S(i)}};return c==="success"?e.jsx($,{icon:e.jsx(E,{className:"h-5 w-5"}),title:"Reserviere deinen Tisch",children:e.jsx(_e,{title:"Dein Tisch ist reserviert!",text:"Wir haben unser Team informiert, dein Platz ist für dich reserviert. Wir freuen uns auf dich!"})}):e.jsx($,{icon:e.jsx(E,{className:"h-5 w-5"}),title:"Reserviere einen Tisch oder einen Raum",children:e.jsxs("form",{id:"reservierung",name:"reservierung","aria-label":"Tischreservierung",className:"space-y-5",onSubmit:U,...O.formProps,children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(m,{htmlFor:"t-location",className:d,children:"Standort"}),e.jsxs(ee,{value:t.location,onValueChange:r=>q(r),children:[e.jsx(te,{id:"t-location",className:b,children:e.jsx(re,{})}),e.jsxs(se,{className:"bg-neutral-950 text-white border-white/15",children:[t.location==="bayreuth"&&e.jsx(z,{value:"bayreuth",children:"Bayreuth"}),e.jsx(z,{value:"prenzlauer-berg",children:"Berlin Prenzlauer Berg"}),e.jsx(z,{value:"fuerth",children:"Fürth"})]})]})]}),e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4 sm:gap-5",children:[e.jsxs("div",{className:"space-y-2 lg:col-span-2",children:[e.jsx(m,{htmlFor:"t-name",className:d,children:"Vollständiger Name"}),e.jsx(_,{id:"t-name",required:!0,value:t.name,onChange:r=>p("name",r.target.value),className:b,placeholder:"Max Mustermann"})]}),e.jsxs("div",{className:"space-y-2 lg:col-span-2",children:[e.jsx(m,{htmlFor:"t-phone",className:d,children:"Telefonnummer"}),e.jsx(_,{id:"t-phone",type:"tel",inputMode:"tel",autoComplete:"tel",required:!0,value:t.phone,onChange:r=>p("phone",r.target.value),className:b,placeholder:"+49 â¦"})]}),e.jsxs("div",{className:"space-y-2 lg:col-span-2",children:[e.jsxs(m,{htmlFor:"t-email",className:d,children:["E-Mail ",e.jsx("span",{className:"text-white/40",children:"(optional)"})]}),e.jsx(_,{id:"t-email",type:"email",maxLength:255,value:t.email,onChange:r=>p("email",r.target.value),className:b,placeholder:"[email protected]"})]}),e.jsxs("div",{className:"space-y-2 min-w-0",children:[e.jsx(m,{htmlFor:"t-
2date",className:d,children:"Datum"}),e.jsx(ae,{id:"t-date",required:!0,value:t.date,onChange:r=>p("date",r),disabled:G,placeholder:"Datum wählen",className:"overflow-hidden [&>span]:truncate [&>span]:block [&>span]:min-w-0"})]}),e.jsxs("div",{className:"space-y-2 min-w-0",children:[e.jsx(m,{htmlFor:"t-time",className:d,children:"Uhrzeit"}),e.jsx(ne,{id:"t-time",required:!0,value:t.time,onChange:r=>p("time",r),startHour:v?16:11,endHour:23,minTime:M})]}),e.jsxs("div",{className:"space-y-2 lg:col-span-2",children:[e.jsx(m,{htmlFor:"t-guests",className:d,children:"GruppengröÃe"}),e.jsx(_,{id:"t-guests",type:"number",min:1,max:100,required:!0,value:t.guests,onChange:r=>p("guests",r.target.value),className:b})]})]}),c==="error"&&T&&e.jsx("p",{className:"text-sm text-red-400",children:T}),e.jsx(X,{type:"submit",disabled:c==="submitting",className:we,size:"lg",children:c==="submitting"?e.jsxs(e.Fragment,{children:[e.jsx(ue,{className:"mr-2 h-4 w-4 animate-spin"})," Sendenâ¦"]}):"Tisch reservieren"})]})})}export{Ue as component};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.