1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,96190,e=>{"use strict";var t=e.i(843476),r=e.i(271645),o=e.i(846696),n=e.i(429971),l=e.i(275471),s=e.i(695619),i=e.i(541373),a=e.i(462675),c=e.i(759599);let d=[{id:"cf1",componentType:"text",label:"Ad",key:"firstName",width:"half",required:!0,isActive:!0,placeholder:"Adınız",order:0},{id:"cf2",componentType:"text",label:"Soyad",key:"lastName",width:"half",required:!0,isActive:!0,placeholder:"Soyadınız",order:1},{id:"cf3",componentType:"email",label:"E-posta",key:"email",width:"half",required:!0,isActive:!0,placeholder:"[email protected]",order:2},{id:"cf4",componentType:"phone",label:"Telefon",key:"phone",width:"half",required:!1,isActive:!0,placeholder:"",order:3},{id:"cf5",componentType:"select",label:"Konu",key:"subject",width:"full",required:!0,isActive:!0,order:4,options:["Rezervasyon","Genel Bilgi","Etkinlik & Organizasyon","SatıŠ& İŠBirliÄi","DiÄer"]},{id:"cf6",componentType:"textarea",label:"Mesaj",key:"message",width:"full",required:!0,isActive:!0,placeholder:"Mesajınızı buraya yazın...",order:5}];function u(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"tr",o="string"==typeof t?t.trim():"",n=o.includes("|")?o.split("|")[1]??"":o,l=(0,i.resolveLocString)(e.label,r);if(e.required){if("checkbox"===e.componentType&&!t)return`${l} zorunludur.`;if("phone"===e.componentType&&!n)return"Telefon numarası zorunludur.";if("checkbox"!==e.componentType&&"phone"!==e.componentType&&!o)return`${l} zorunludur.`}if(o){if("email"===e.componentType&&!a.EMAIL_RE.test(o))return"Geçerli bir e-posta adresi girin.";if("phone"===e.componentType&&n){let e=(0,a.validatePhone)(o,"tr"===r?"tr":"en");if(e)return e}}return null}function p(e){let{value:o,onChange:n,onBlur:l,options:s,placeholder:i,error:a}=e,[c,d]=(0,r.useState)(!1),[u,p]=(0,r.useState)(null),h=(0,r.useRef)(null),m=(0,r.useRef)(null);(0,r.useEffect)(()=>{let e=e=>{var t,r;let o=e.target;(null==(t=h.current)?void 0:t.contains(o))||(null==(r=m.current)?void 0:r.contains(o))||d(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]),(0,r.useEffect)(()=>{if(!c)return;let e=()=>d(!1);return window.addEventListener("scroll",e,!0),window.addEventListener("resize",e),()=>{window.removeEventListener("scroll",e,!0),window.removeEventListener("resize",e)}},[c]);let x=`w-full rounded-full border px-4 py-2 text-base outline-none transition-colors focus:ring-1 flex items-center justify-between text-left ${a?"border-red-400 focus:border-red-400 focus:ring-red-200":"border-[#E0DAD1] focus:border-[#A79966] focus:ring-[#A79966]/30"} ${!o?"text-[#171D37]/40":"text-[#171D37]"}`;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"relative",children:(0,t.jsxs)("button",{ref:h,type:"button",onBlur:l,onClick:()=>{if(!c&&h.current){let e=h.current.getBoundingClientRect();p({top:e.bottom+4,left:e.left,width:e.width})}d(e=>!e)},className:x,children:[(0,t.jsx)("span",{children:o||(i??"Seçin")}),(0,t.jsx)("svg",{className:`h-4 w-4 shrink-0 text-[#171D37]/40 transition-transform ${c?"rotate-180":""}`,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:(0,t.jsx)("polyline",{points:"6 9 12 15 18 9"})})]})}),c&&u&&(0,t.jsx)("ul",{ref:m,style:{position:"fixed",top:u.top,left:u.left,width:u.width,zIndex:9999},className:"overflow-hidden rounded-2xl border border-[#E0DAD1] bg-white shadow-[0_4px_20px_0_rgba(23,29,55,0.12)]",children:s.map(e=>(0,t.jsx)("li",{children:(0,t.jsx)("button",{type:"button",onClick:()=>{n(e),d(!1)},className:`w-full px-4 py-2.5 text-left text-sm transition-colors hover:bg-[#A79966]/10 ${e===o?"font-semibold text-[#A79966]":"text-[#171D37]/80"}`,children:e})},e))})]})}function h(e){let t="w-full rounded-full border px-4 py-2 text-base text-[#171D37] outline-none transition-colors focus:ring-1";return e?`${t} border-red-400 focus:border-red-400 focus:ring-red-200`:`${t} border-[#E0DAD1] focus:border-[#A79966] focus:ring-[#A79966]/30`}function m(e){let{fields:a,formSection:m}=e,{locale:x,d:f}=(0,s.useLocale)(),b="tr"===x,g=null==m?void 0:m.messages,v={title:(0,i.resolveLocString)(null==m?void 0:m.title,x)||f("contact_form_title",b?"Bize Yazın":"Write to Us"),subtitle:(0,i.resolveLocString)(null==m?void 0:m.subtitle,x)||f("contact_form_subtitle",b?"Sorularınız için formu doldurun, en kısa sürede size dönüŠyapacaÄız.":"Fill in the form for your questions and we will get back to you shortly."),submit:(0,i.resolveLocString)(null==m?void 0:m.submitLabel,x)||f("contact_submit",b?"Gönder":"Send"),submitting:(0,i.resolveLocString)(null==m?void 0:m.submittingLabel,x)||f("contact_submitting",b?"Gönderiliyor...":"Sending..."),successBanner:(0,i.resolveLocString)(null==m?void 0:m.successBanner,x)||f("contact_success_banner",b?"Mesajınız gönderildi. En kısa sürede sizinle iletiÅime geçeceÄiz.":"Your message has been sent. We will contact you as soon as possible."),toastSuccessTitle:(0,i.resolveLocString)(null==g?void 0:g.successTitle,x)||f("contact_toast_success_title",b?"Mesajınız gönderildi!":"Your message has been sent!"),toastSuccessDesc:(0,i.resolveLocString)(null==g?void 0:g.successDescription,x)||f("contact_toast_success_desc",b?"En kısa sürede sizinle iletiÅime geçeceÄiz.":"We will contact you as soon as possible."),toastValidation:(0,i.resolveLocString)(null==g?void 0:g.validationError,x)||f("contact_toast_validation",b?"Lütfen tüm zorunlu alanları doldurun.":"Please fill in all required fields."),toastSendError:(0,i.resolveLocString)(null==g?void 0:g.sendError,x)||f("contact_toast_send_error",b?"Mesaj gönderilemedi.":"Could not send message."),toastGenericError:(0,i.resolveLocString)(null==g?void 0:g.genericError,x)||f("contact_toast_generic_error",b?"Bir hata oluÅtu.":"An error occurred.")},[y,w]=(0,r.useState)({}),[j,k]=(0,r.useState)({}),[S,_]=(0,r.useState)({}),[L,T]=(0,r.useState)(!1),[E,N]=(0,r.useState)(!1),A=(a??d).filter(e=>!1!==e.isActive).sort((e,t)=>
1e.order-t.order),D=A.filter(e=>e.required&&"section-header"!==e.componentType&&"divider"!==e.componentType).every(e=>{let t=y[e.key];return"checkbox"===e.componentType?!!t:"phone"===e.componentType?("string"==typeof t&&t.includes("|")?t.split("|")[1]:String(t??"")).trim().length>0:"string"==typeof t&&t.trim().length>0}),z=(e,t)=>{w(r=>({...r,[e]:t})),j[e]&&k(t=>({...t,[e]:null}))},B=e=>S[e]?j[e]:null,C=async e=>{if(e.preventDefault(),!E){if(!(()=>{let e={},t={},r=!1;for(let o of A){if("section-header"===o.componentType||"divider"===o.componentType)continue;t[o.key]=!0;let n=u(o,y[o.key]??"");e[o.key]=n,n&&(r=!0)}return _(t),k(e),!r})())return void o.toast.error(v.toastValidation,{description:f("contact_toast_validation_desc","Fill in the highlighted fields completely and in the correct format.")});N(!0);try{let e=Object.fromEntries(Object.entries(y).map(e=>{let[t,r]=e;if("string"==typeof r&&r.includes("|")){let[e,o]=r.split("|");return[t,o?`${e} ${o}`:e]}return[t,r]}));await n.api.post("/api/contact-submissions",{fields:e}),T(!0),w({}),k({}),_({}),o.toast.success(v.toastSuccessTitle,{description:v.toastSuccessDesc})}catch(e){o.toast.error(v.toastSendError,{description:(0,c.toUserErrorMessage)(e,v.toastGenericError)})}finally{N(!1)}}};return(0,t.jsxs)("div",{className:"w-full max-w-[904px] rounded-3xl bg-white p-6 sm:p-10",style:{boxShadow:"0px 5px 11px 0px rgba(23,29,55,0.1), 0px 20px 20px 0px rgba(23,29,55,0.09), 0px 45px 27px 0px rgba(23,29,55,0.05), 0px 80px 32px 0px rgba(23,29,55,0.01), 0px 125px 35px 0px rgba(23,29,55,0)"},children:[(0,t.jsxs)("div",{className:"mb-8 text-center",children:[(0,t.jsx)("h2",{className:"font-[family-name:var(--font-cormorant)] text-[38px] font-semibold leading-tight text-[#171D37] sm:text-[48px]",children:v.title}),(0,t.jsx)("p",{className:"mt-2.5 text-base font-medium text-[#171D37]/70",children:v.subtitle})]}),L&&(0,t.jsx)("div",{className:"mb-8 rounded-2xl bg-green-50 p-4 text-center text-sm text-green-700",children:v.successBanner}),(0,t.jsxs)("form",{onSubmit:C,noValidate:!0,className:"space-y-5",children:[(function(e){let t=[],r=0;for(;r<e.length;){var o;let n=e[r];"half"===n.width&&(null==(o=e[r+1])?void 0:o.width)==="half"?(t.push([n,e[r+1]]),r+=2):(t.push([n]),r++)}return t})(A).map((e,r)=>(0,t.jsx)("div",{className:2===e.length?"flex flex-col gap-4 sm:flex-row sm:gap-3":"",children:e.map(r=>
1{let o=B(r.key),n="section-header"!==r.componentType&&"divider"!==r.componentType&&"checkbox"!==r.componentType;return(0,t.jsxs)("div",{className:2===e.length?"flex-1 space-y-1.5":"space-y-1.5",children:[n&&(0,t.jsxs)("label",{className:"block text-base font-semibold text-[#171D37]",children:[(0,i.resolveLocString)(r.label,x),r.required&&(0,t.jsx)("span",{className:"ml-0.5 text-red-500",children:"*"})]}),function(e){let r=y[e.key]??"",o=B(e.key),n=t=>z(e.key,t),s=()=>{let t;return _(t=>({...t,[e.key]:!0})),t=u(e,y[e.key]??""),void k(r=>({...r,[e.key]:t}))};switch(e.componentType){case"text":default:return(0,t.jsx)("input",{type:"text",value:r,onChange:e=>n(e.target.value),onBlur:s,placeholder:(0,i.resolveLocString)(e.placeholder,x),className:h(o)});case"email":return(0,t.jsx)("input",{type:"email",value:r,onChange:e=>n(e.target.value),onBlur:s,placeholder:(0,i.resolveLocString)(e.placeholder,x),className:h(o)});case"phone":return(0,t.jsx)(l.PhoneInput,{value:r,onChange:n,placeholder:(0,i.resolveLocString)(e.placeholder,x)||f("contact_placeholder_phone",b?"Telefon Numarası":"Phone Number"),required:e.required,variant:"pill",error:o??void 0});case"number":return(0,t.jsx)("input",{type:"number",value:r,onChange:e=>n(e.target.value),onBlur:s,placeholder:(0,i.resolveLocString)(e.placeholder,x),className:h(o)});case"textarea":let a;return(0,t.jsx)("textarea",{value:r,onChange:e=>n(e.target.value),onBlur:s,placeholder:(0,i.resolveLocString)(e.placeholder,x),rows:5,className:(a="w-full rounded-2xl border px-4 py-3 text-base text-[#171D37] outline-none transition-colors focus:ring-1",o?`${a} border-red-400 focus:border-red-400 focus:ring-red-200`:`${a} border-[#E0DAD1] focus:border-[#A79966] focus:ring-[#A79966]/30`)});case"select":return(0,t.jsx)(p,{value:r,onChange:t=>{z(e.key,t),_(t=>({...t,[e.key]:!0}))},onBlur:s,options:e.options??[],placeholder:(0,i.resolveLocString)(e.placeholder,x)||f("contact_select_placeholder",b?"Seçin":"Select"),error:o});case"checkbox":return(0,t.jsxs)("label",{className:"flex cursor-pointer items-center gap-2",children:[(0,t.jsx)("input",{type:"checkbox",checked:!!y[e.key],onChange:t=>z(e.key,t.target.checked),className:"h-4 w-4 rounded border-[#E0DAD1] accent-[#A79966]"}),(0,t.jsx)("span",{className:"text-sm text-[#171D37]/70",children:(0,i.resolveLocString)(e.placeholder,x)})]});case"section-header":return(0,t.jsx)("h3",{className:"font-[family-name:var(--font-cormorant)] text-xl font-semibold text-[#171D37]",children:(0,i.resolveLocString)(e.label,x)});case"divider":return(0,t.jsx)("hr",{className:"border-[#E0DAD1]"})}}(r),o&&"phone"!==r.componentType&&(0,t.jsx)("p",{className:"text-[12px] text-red-500",children:o})]},r.id)})},r)),(0,t.jsxs)("button",{type:"submit",disabled:E,"aria-disabled":!D||E,className:`flex w-full items-center justify-center gap-2 rounded-full bg-[#A79966] px-4 py-2.5 text-base font-semibold text-white transition-colors ${D&&!E?"hover:bg-[#8D7F4E]":"cursor-not-allowed opacity-50"} disabled:cursor-not-allowed disabled:opacity-50`,children:[(0,t.jsx)("span",{children:E?v.submitting:v.submit}),(0,t.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,t.jsx)("path",{d:"M3.33 8h9.34M8.67 4l4 4-4 4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})]})]})]})}e.s(["ContactForm",()=>m])}]);
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.