const pricing = { balanced: { name: "Balanced", description: "A little bit of everything, dialed into a rhythm you can actually keep.", prices: [5000, 4000, 2000], }, bulk: { name: "Bulk", description: "Intentional calories, complex carbs and protein in a bigger, bolder box.", prices: [6000, 5000, 2500], }, protein: { name: "Protein", description: "Pure protein power for the work you put in, from first rep to last.", prices: [6500, 5500, 3000], }, lean: { name: "Lean", description: "Minimal fats. Maximum clarity. Light, clean meals to help you move sharper.", prices: [7000, 6000, 3500], }, }; const WHATSAPP_NUMBER = "919453226814"; const options = [ { label: "Breakfast, lunch & dinner", detail: "3 meals a day" }, { label: "Lunch & dinner", detail: "2 meals a day" }, { label: "Dinner", detail: "1 meal a day" }, ]; const mode = new URLSearchParams(window.location.search).get("mode") || "balanced"; const selected = pricing[mode] || pricing.balanced; document.title = `${selected.name} mode pricing — The Tiffin Food`; document.querySelector("#mode-title").textContent = `${selected.name} mode`; document.querySelector("#mode-description").textContent = selected.description; document.querySelector("#pricing-options").innerHTML = options .map((option, index) => `

0${index + 1}

${option.label}

${option.detail}

₹${selected.prices[index].toLocaleString("en-IN")}/ month Choose this box ↗
`) .join(""); document.querySelector("#customize-form").addEventListener("submit", (event) => { event.preventDefault(); const form = new FormData(event.currentTarget); const message = [ "Hi The Tiffin Food! I would like to customize my tiffin.", "", `Plan: ${selected.name} mode`, `Destination: ${form.get("destination")}`, `Preferred delivery window: ${form.get("timing")}`, `Meal preferences: ${form.get("preferences") || "None specified"}`, ].join("\n"); document.querySelector(".form-note").textContent = "Opening WhatsApp with your tiffin preferences."; window.location.href = `https://wa.me/${WHATSAPP_NUMBER}?text=${encodeURIComponent(message)}`; });