"use client" import { useState } from "react" import { Button } from "@/components/ui/button" import { Card, CardContent, CardHeader, CardTitle, CardDescription } from "@/components/ui/card" import { Badge } from "@/components/ui/badge" import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs" import { MapPin, Building, Bath, BedDouble, Share, ChevronRight, Info, Ruler, Clock, Star, Droplets, Wind, Sun, BarChart2, LineChart, Calendar, Download, FileText, } from "lucide-react" import Link from "next/link" export default function PropertyDetailPage({ params }: { params: { id: string } }) { const [liked, setLiked] = useState(false) // This would normally come from an API call using the ID const property = { id: params.id, title: "Modern Condominium in Sukhumvit", price: 15000000, location: "Sukhumvit Soi 24, Bangkok", bedrooms: 3, bathrooms: 2, area: 150, type: "Condominium", description: "This stunning modern condominium is located in the heart of Sukhumvit, one of Bangkok's most vibrant neighborhoods. The property features 3 spacious bedrooms, 2 bathrooms, and a large living area with floor-to-ceiling windows offering panoramic city views. The unit comes fully furnished with high-end appliances and fixtures. The building amenities include a swimming pool, fitness center, sauna, and 24-hour security.", features: [ "Floor-to-ceiling windows", "Fully furnished", "High-end appliances", "Marble countertops", "Hardwood floors", "Central air conditioning", "Walk-in closet", "Balcony with city view", ], amenities: [ "Swimming pool", "Fitness center", "Sauna", "24-hour security", "Parking", "Garden", "Playground", "BBQ area", ], images: [ "/placeholder.svg?height=500&width=800", "/placeholder.svg?height=500&width=800", "/placeholder.svg?height=500&width=800", "/placeholder.svg?height=500&width=800", ], yearBuilt: 2018, floorLevel: 15, totalFloors: 32, parkingSpaces: 1, furnished: "Fully Furnished", ownership: "Freehold", availableFrom: "Immediate", premium: true, priceHistory: [ { date: "2018", price: 12000000 }, { date: "2020", price: 13500000 }, { date: "2022", price: 14800000 }, { date: "2024", price: 15000000 }, ], marketTrends: { areaGrowth: 5.2, similarProperties: 8, averagePrice: 14500000, pricePerSqm: 100000, }, environmentalFactors: { floodRisk: "Moderate", airQuality: "Poor", noiseLevel: "Low", }, nearbyFacilities: [ { name: "BTS Phrom Phong Station", distance: 300 }, { name: "EmQuartier Shopping Mall", distance: 500 }, { name: "Benchasiri Park", distance: 700 }, { name: "Samitivej Hospital", distance: 1200 }, ], } return (
Home Properties {property.title}
{/* Property Images */}
{property.title}
{property.type} {property.premium && ( Premium )}
{/* Thumbnail Images */}
{property.images.map((image, index) => (
{`${property.title}
))}
{/* Property Details */}

{property.title}

฿{property.price.toLocaleString()}
{property.location}
{property.bedrooms}
Bedrooms
{property.bathrooms}
Bathrooms
{property.area} m²
Area
Floor {property.floorLevel}
of {property.totalFloors}
{property.yearBuilt}
Year Built
Description Features Location Analytics

{property.description}

Property Type {property.type}
Furnishing {property.furnished}
Ownership {property.ownership}
Available From {property.availableFrom}
Parking Spaces {property.parkingSpaces}

Property Features

{property.features.map((feature, index) => (
{feature}
))}

Building Amenities

{property.amenities.map((amenity, index) => (
{amenity}
))}

Nearby Facilities

{property.nearbyFacilities.map((facility, index) => (
{facility.name} {facility.distance}m
))}

Environmental Factors

Flood Risk
{property.environmentalFactors.floodRisk}
Air Quality
{property.environmentalFactors.airQuality}
Noise Level
{property.environmentalFactors.noiseLevel}
Price Prediction
฿15,000,000

The estimated price based on various factors

Market Trends
Area Price Trend Rising

Prices in this area have increased by {property.marketTrends.areaGrowth}% in the last year

Average Price in Area ฿{property.marketTrends.averagePrice.toLocaleString()}
Price per sqm ฿{property.marketTrends.pricePerSqm.toLocaleString()}
Price History
{/* Simple line chart simulation */}
{property.priceHistory.map((item, index) => (
{item.date}
฿{(item.price / 1000000).toFixed(1)}M
))}
Last updated: 2 days ago
Data Reports
{/* Analytics Summary Card */} Analytics Summary Key insights about this property

Price Analysis

Current Price ฿{property.price.toLocaleString()}
Price per sqm ฿{property.marketTrends.pricePerSqm.toLocaleString()}
Area Average ฿{property.marketTrends.averagePrice.toLocaleString()}
Price Trend +{property.marketTrends.areaGrowth}%

Environmental Assessment

Flood Risk {property.environmentalFactors.floodRisk}
Air Quality {property.environmentalFactors.airQuality}
Noise {property.environmentalFactors.noiseLevel}

Nearby Facilities

{property.nearbyFacilities.map((facility, index) => (
{facility.name} {facility.distance}m
))}
{/* Similar Properties */}

Similar Properties

) } interface SimilarPropertyCardProps { id: string title: string price: number location: string bedrooms: number bathrooms: number area: number image: string } function SimilarPropertyCard({ id, title, price, location, bedrooms, bathrooms, area, image, }: SimilarPropertyCardProps) { return (
{title}

{title}

{location}
{bedrooms} bd {bathrooms} ba {area} m²
฿{price.toLocaleString()}
) }