'use client'; import { useState, FormEvent } from 'react'; import { useRouter } from 'next/navigation'; import { Button, Label, Input, DateInput, Dropdown, DropdownCounter } from '@/components/ui'; import { dateToDaysFromToday } from '@/lib/hotel-utils'; const LocationIcon = () => ( ); export default function HotelHero() { const router = useRouter(); const [destination, setDestination] = useState(''); const [checkIn, setCheckIn] = useState(''); const [guests, setGuests] = useState({ adults: 2, rooms: 1 }); const handleSearch = (e: FormEvent) => { e.preventDefault(); const params = new URLSearchParams(); if (checkIn) { const daysOffset = dateToDaysFromToday(checkIn); params.set('dateIndex', daysOffset.toString()); } if (destination) params.set('destination', destination); params.set('adults', guests.adults.toString()); params.set('rooms', guests.rooms.toString()); router.push(`/hotel/products?${params.toString()}`); }; return (

Find your perfect room

Search rooms, compare prices, and book with confidence

setDestination(e.target.value)} placeholder="City, hotel, or landmark" icon={} required />
setCheckIn(e.target.value)} required />
setGuests({ ...guests, adults: v })} />

Over 2 million rooms worldwide · Best price guarantee · Free cancellation on most bookings

); }