/* eslint-disable jsx-a11y/control-has-associated-label */ /* eslint-disable @next/next/no-img-element */ /* eslint-disable jsx-a11y/alt-text */ /* eslint-disable jsx-a11y/anchor-is-valid */ /* eslint-disable @next/next/no-page-custom-font */ /* eslint-disable jsx-a11y/label-has-associated-control */ import dayjs from "dayjs"; import Head from "next/head"; import { Preload } from "@/server/preload/preload"; const destinationList = [ { key: "ADA", destinationId: 38115, destination: "Adana", }, { key: "ADF", destinationId: 38116, destination: "Adıyaman", }, { key: "MZH", destinationId: 38118, destination: "Amasya", }, { key: "AJI", destinationId: 38119, destination: "Ağrı", }, { key: "ESB", destinationId: 38123, destination: "Ankara", }, { key: "ANK", destinationId: 38123, destination: "Ankara", }, { key: "AYT", destinationId: 38140, destination: "Antalya", }, { key: "GZP", destinationId: 38140, destination: "Antalya", }, { key: "XHQ", destinationId: 38182, destination: "Artvin", }, { key: "BDM", destinationId: 38184, destination: "Balıkesir", }, { key: "EDO", destinationId: 38184, destination: "Balıkesir", }, { key: "BZI", destinationId: 38184, destination: "Balıkesir", }, { key: "BAL", destinationId: 38187, destination: "Batman", }, { key: "BGG", destinationId: 38187, destination: "Bingöl", }, { key: "YEI", destinationId: 38258, destination: "Bursa", }, { key: "CKZ", destinationId: 38259, destination: "Çanakkale", }, { key: "GKD", destinationId: 38259, destination: "Çanakkale", }, { key: "DNZ", destinationId: 38262, destination: "Denizli", }, { key: "DIY", destinationId: 38263, destination: "Diyarbakır", }, { key: "EZS", destinationId: 38270, destination: "Elazığ", }, { key: "ERC", destinationId: 38272, destination: "Erzincan", }, { key: "ERZ", destinationId: 38273, destination: "Erzurum", }, { key: "AOE", destinationId: 38274, destination: "Eskişehir", }, { key: "ESK", destinationId: 38274, destination: "Eskişehir", }, { key: "GZT", destinationId: 38276, destination: "Gaziantep", }, { key: "YKO", destinationId: 38266, destination: "Hakkari", }, { key: "HTY", destinationId: 38281, destination: "Hatay", }, { key: "IGD", destinationId: 38283, destination: "Iğdır", }, { key: "ISE", destinationId: 38285, destination: "Isparta", }, { key: "IST", destinationId: 38286, destination: "İstanbul", }, { key: "SAW", destinationId: 38286, destination: "İstanbul", }, { key: "ADB", destinationId: 38341, destination: "İzmir", }, { key: "IGL", destinationId: 38341, destination: "İzmir", }, { key: "KCM", destinationId: 38345, destination: "Kahramanmaraş", }, { key: "KSY", destinationId: 38348, destination: "Kars", }, { key: "KFS", destinationId: 38349, destination: "Kastomonu", }, { key: "ASR", destinationId: 38350, destination: "Kayseri", }, { key: "KCO", destinationId: 38357, destination: "Kocaeli", }, { key: "KYA", destinationId: 38358, destination: "Konya", }, { key: "KZR", destinationId: 38359, destination: "Kütahya", }, { key: "MLX", destinationId: 38360, destination: "Malatya", }, { key: "MQM", destinationId: 38362, destination: "Mardin", }, { key: "BJV", destinationId: 38365, destination: "Muğla", }, { key: "DLM", destinationId: 38365, destination: "Muğla", }, { key: "MSR", destinationId: 38369, destination: "Muş", }, { key: "NAV", destinationId: 38370, destination: "Nevşehir", }, { key: "OGU", destinationId: 38372, destination: "Ordu", }, { key: "SSX", destinationId: 38376, destination: "Samsun", }, { key: "SZF", destinationId: 38376, destination: "Samsun", }, { key: "GNY", destinationId: 38377, destination: "Şanlıurfa", }, { key: "SFQ", destinationId: 38377, destination: "Şanlıurfa", }, { key: "SXZ", destinationId: 38378, destination: "Siirt", }, { key: "SIC", destinationId: 38379, destination: "Sinop", }, { key: "NOP", destinationId: 38379, destination: "Sinop", }, { key: "NKT", destinationId: 38380, destination: "Şırnak", }, { key: "VAS", destinationId: 38381, destination: "Sivas", }, { key: "TEQ", destinationId: 38382, destination: "Tekirdağ", }, { key: "TJK", destinationId: 38385, destination: "Tokat", }, { key: "TZX", destinationId: 38386, destination: "Trabzon", }, { key: "USQ", destinationId: 38388, destination: "Uşak", }, { key: "VAN", destinationId: 38389, destination: "Van", }, { key: "ONQ", destinationId: 38392, destination: "Zonguldak", }, { key: "RZV", destinationId: 38374, destination: "Rize", }, ]; const globalisationText = [ { key: "en", title: "Book your hotel through our partner, Jolly, and earn 2 miles for every €1 spent.", destinationLabel: "Where are you going?", checkinLabel: "Check-in", checkoutLabel: "Check-out", buttonText: "Search", }, { key: "tr", title: "Otel rezervasyonunuzu anlaşmalı olduğumuz Jolly üzerinden yapın, harcadığınız her 1€ için 2 mil kazanın.", destinationLabel: "Nereye gidiyorsunuz?", checkinLabel: "Giriş Tarihi", checkoutLabel: "Çıkış Tarihi", buttonText: "Ara", }, { key: "de", title: "Buchen Sie Ihr Hotel über unseren Partner Jolly und sammeln Sie 2 Meilen für jeden ausgegebenen Euro.", destinationLabel: "Wohin geht ihr?", checkinLabel: "Einreisedatum", checkoutLabel: "Veröffentlichungsdatum", buttonText: "Suchen", }, { key: "pt-br", title: "Reserve o seu hotel através do nosso parceiro, Jolly, e ganhe 2 milhas para cada € gasto.", destinationLabel: "Where are you going?", checkinLabel: "Check-in", checkoutLabel: "Check-out", buttonText: "Search", }, { key: "fr", title: "Réservez votre hôtel par l’intermédiaire de notre partenaire, Jolly, et gagnez 2 Miles pour chaque euro dépensé.", destinationLabel: "Where are you going?", checkinLabel: "Check-in", checkoutLabel: "Check-out", buttonText: "Search", }, { key: "es", title: "Reserve su hotel a través de nuestro socio, Jolly, y gane 2 millas por cada 1 € gastado.", destinationLabel: "Where are you going?", checkinLabel: "Check-in", checkoutLabel: "Check-out", buttonText: "Search", }, { key: "it", title: "Prenota l'hotel tramite il nostro partner, Jolly, e guadagna 2 Miglia per ogni € speso.", destinationLabel: "Where are you going?", checkinLabel: "Check-in", checkoutLabel: "Check-out", buttonText: "Search", }, { key: "ja-jp", title: "弊社のパートナーであるJollyでホテルを予約すると、1ユーロごとに2マイルを獲得できます。", destinationLabel: "Where are you going?", checkinLabel: "Check-in", checkoutLabel: "Check-out", buttonText: "Search", }, { key: "ko-kr", title: "파트너인 Jolly를 통해 호텔을 예약하고 €1당 2마일을 적립하세요.", destinationLabel: "Where are you going?", checkinLabel: "Check-in", checkoutLabel: "Check-out", buttonText: "Search", }, { key: "pt-pt", title: "Reserve o seu hotel através do nosso parceiro, Jolly, e ganhe 2 milhas para cada € gasto.", destinationLabel: "Where are you going?", checkinLabel: "Check-in", checkoutLabel: "Check-out", buttonText: "Search", }, { key: "ru", title: "Забронируйте отель с помощью нашего партнера, Jolly, и зарабатывайте 2 мили за каждый потраченный евро.", destinationLabel: "Where are you going?", checkinLabel: "Check-in", checkoutLabel: "Check-out", buttonText: "Search", }, { key: "th", title: "จองโรงแรมของคุณผ่านพาร์ทเนอร์ของเรา Jolly และรับ 2 ไมล์สำหรับทุกๆ €1 ที่ใช้ไป", destinationLabel: "Where are you going?", checkinLabel: "Check-in", checkoutLabel: "Check-out", buttonText: "Search", }, { key: "uk-ua", title: "Забронюйте готель за через нашого партнера Jolly й заробляйте 2 милі за кожне витрачене євро.", destinationLabel: "Where are you going?", checkinLabel: "Check-in", checkoutLabel: "Check-out", buttonText: "Search", }, { key: "ar", title: "واكسبميلينمقابلكليوروتنفقه Jolly احجزفندقكمنخلالشريكنا", destinationLabel: "Where are you going?", checkinLabel: "Check-in", checkoutLabel: "Check-out", buttonText: "Search", }, { key: "zh-cn", title: "通过我们的合作伙伴 Jolly 预订酒店,每消费 1 欧元即可赚取 2 里程。", destinationLabel: "Where are you going?", checkinLabel: "Check-in", checkoutLabel: "Check-out", buttonText: "Search", }, { key: "zh-tw", title: "通过我们的合作伙伴 Jolly 预订酒店,每消费 1 欧元即可赚取 2 里程。", destinationLabel: "Where are you going?", checkinLabel: "Check-in", checkoutLabel: "Check-out", buttonText: "Search", }, ]; interface PageWithSlugProps { searchParams: { originCode: string; destinationCode: string; originId: string; destinationId: string; checkinDate: string; checkoutDate: string; rooms: string; trf_src: string; lng: string; cur: string; }; } export default async function ThySuccessIframe(props: PageWithSlugProps) { const baseUrl = await Preload.getBaseUrl(); const globalisation = globalisationText.find( ({ key }) => key === props.searchParams.lng, ); const destination = destinationList.find( ({ key }) => key === props.searchParams.destinationCode, ); const destinationValue = destination?.destination; const checkinDate = dayjs(props.searchParams.checkinDate).format( "DD/MM/YYYY", ); const checkoutDate = dayjs(props.searchParams.checkoutDate).format( "DD/MM/YYYY", ); const imageUrl = `https://gordiosdata.blob.core.windows.net/files/eva/images/cities/${props.searchParams.destinationCode}.jpg`; return ( <>

{globalisation?.title}

{globalisation?.buttonText}
); }