"use client" import { AlertTriangle, CheckCircle2, MessageSquare, RefreshCw, Star, XCircle } from "lucide-react" import Link from "next/link" import { useState } from "react" import { Button } from "@/components/ui/button" import type { OrderStatus } from "@/lib/types" interface OrderActionsProps { orderId: string initialStatus: OrderStatus chatSessionId?: string serviceId: string } function showFeedback(message: string) { if (typeof window === "undefined") return window.alert(message) } export default function OrderActions({ orderId, initialStatus, chatSessionId, serviceId, }: OrderActionsProps) { const [status, setStatus] = useState(initialStatus) return (
{status === "pending_accept" && ( <> )} {(status === "in_progress" || status === "pending_close") && chatSessionId && ( )} {status === "in_progress" && ( <> )} {status === "pending_close" && ( <> )} {status === "pending_review" && ( )} {status === "completed" && ( )}
) }