"use client" import { useParams } from "next/navigation" import { useState } from "react" import Layout from "@/components/kokonutui/layout" import { Button } from "@/components/ui/button" import { Input } from "@/components/ui/input" import { ArrowLeft, Truck, DollarSign, Package, User } from "lucide-react" import Link from "next/link" export default function OrderDetails() { const params = useParams() const orderId = params.id // In a real application, you would fetch the order details based on the orderId const [trackingNumber, setTrackingNumber] = useState("") const order = { id: orderId, customer: "John Doe", email: "john.doe@example.com", date: "2023-05-01", total: "$150.00", status: "Processing", tracking: "", items: [ { id: 1, name: "Product A", quantity: 2, price: "$50.00" }, { id: 2, name: "Product B", quantity: 1, price: "$50.00" }, ], shippingAddress: "123 Main St, Anytown, AN 12345", } const handleSaveTracking = () => { // TODO: Implement API call to save tracking number console.log("Tracking number saved:", trackingNumber) } return (

Order Details: {order.id}

Customer Information

Name: {order.customer}

Email: {order.email}

Shipping Address: {order.shippingAddress}

Order Summary

Order Date: {order.date}

Total: {order.total}

Status: {order.status}

{/* Tracking Input Field */}

Tracking Number:

setTrackingNumber(e.target.value)} className="mt-2" />

Order Items

{order.items.map((item) => ( ))}
Product Quantity Price
{item.name} {item.quantity} {item.price}
) }