"use client"

import { Wifi, Car, Utensils, Wind, Monitor, Waves, Dumbbell, Coffee, Briefcase, Droplets, Tv } from "lucide-react";
import localFont from "next/font/local";
import { Header } from "./header";
import { ImageGrid } from "./image-grid";
import { HostInfo } from "./host-info";
import { Highlights } from "./highlights";
import { Description } from "./description";
import { Amenities } from "./amenities";
import { BookingCard } from "./booking-card";
import { Reviews } from "./reviews";
import { Property } from "./types";

const figtree = localFont({
    src: [
        {
            path: '../../../public/Fonts/figtree/figtree.ttf',
        },
    ],
})

const property: Property = {
    title: "Luxury Villa with Panoramic Mountain Views",
    location: "Islamabad, Pakistan",
    guests: 4,
    bedrooms: 2,
    beds: 2,
    bathrooms: 2,
    rating: 4.81,
    reviewCount: 5,
    price: 25000,
    description: "Experience the ultimate luxury in this stunning villa located in the heart of Islamabad. Featuring breathtaking mountain views, modern amenities, and a serene atmosphere, this is the perfect getaway for families and couples alike. The property boasts a spacious living area, a fully equipped kitchen, and a private garden.",
    amenities: [
        { icon: Wifi, label: "Fast Wifi", category: "Internet & Office" },
        { icon: Monitor, label: "TV with Netflix", category: "Entertainment" },
        { icon: Briefcase, label: "Dedicated workspace", category: "Internet & Office" },
        { icon: Car, label: "Free Parking", category: "Parking & Facilities" },
        { icon: Utensils, label: "Full Kitchen", category: "Kitchen" },
        { icon: Coffee, label: "Coffee Maker", category: "Kitchen" },
        { icon: Wind, label: "Air Conditioning", category: "Heating & Cooling" },
        { icon: Waves, label: "Private Pool", category: "Parking & Facilities" },
        { icon: Dumbbell, label: "Gym", category: "Parking & Facilities" },
        { icon: Droplets, label: "Washer & Dryer", category: "Services" },
        { icon: Tv, label: "HDTV", category: "Entertainment" }
    ],
    host: {
        name: "John Doe",
        image: "https://picsum.photos/100/100",
        joined: "2020",
        isSuperhost: true
    },
    photos: [
        "/hotel-banner.png",
        "/hotel-banner.png",
        "/hotel-banner.png",
        "/hotel-banner.png",
        "/hotel-banner.png"
    ],
    reviews: [
        {
            id: 1,
            user: "Sarah Smith",
            avatar: "https://picsum.photos/50/50?random=1",
            date: "October 2023",
            rating: 5,
            comment: "Absolutely stunning property! The views are incredible and the host was very responsive. The villa was spotless and had everything we needed for a comfortable stay."
        },
        {
            id: 2,
            user: "Mike Johnson",
            avatar: "https://picsum.photos/50/50?random=2",
            date: "September 2023",
            rating: 4.5,
            comment: "Great location and amenities. The only minor issue was the wifi speed, but otherwise perfect. The pool was amazing and the kids loved it."
        },
        {
            id: 3,
            user: "Emily Davis",
            avatar: "https://picsum.photos/50/50?random=3",
            date: "August 2023",
            rating: 5,
            comment: "A perfect getaway! The attention to detail in the design is impressive. We will definitely be coming back next year."
        },
        {
            id: 4,
            user: "David Wilson",
            avatar: "https://picsum.photos/50/50?random=4",
            date: "July 2023",
            rating: 4.8,
            comment: "Beautiful location and very comfortable beds. The kitchen is well-stocked for cooking meals."
        },
        {
            id: 5,
            user: "Jessica Brown",
            avatar: "https://picsum.photos/50/50?random=5",
            date: "June 2023",
            rating: 5,
            comment: "Host was super helpful and gave great local recommendations. The house is even better than the photos."
        }
    ],
    propertyType: "house",
    placeType: "entire",
    instantBook: true,
    safety: ["camera", "alarm"]
}

function Features() {
    return (
        <div className={`w-full bg-white ${figtree.className}`}>
            <Header property={property} />
            <ImageGrid photos={property.photos} />

            {/* Main Content */}
            <div className="max-w-[95%] mx-auto grid grid-cols-1 lg:grid-cols-3 gap-12 mb-20">
                {/* Left Column */}
                <div className="lg:col-span-2 space-y-10">
                    <HostInfo
                        host={property.host}
                        guests={property.guests}
                        bedrooms={property.bedrooms}
                        beds={property.beds}
                        bathrooms={property.bathrooms}
                    />
                    <Highlights />
                    <Description description={property.description} />
                    <Amenities amenities={property.amenities} />
                </div>

                {/* Right Column - Sticky Booking Card */}
                <BookingCard
                    price={property.price}
                    rating={property.rating}
                    reviewCount={property.reviewCount}
                />
            </div>

            <Reviews
                reviews={property.reviews}
                rating={property.rating}
                reviewCount={property.reviewCount}
            />
        </div>
    )
}

export default Features;