'use client';
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { Crosshair } from '@phosphor-icons/react';
import { MethodBadge } from '../../shared/method-badge';
import { cn } from '@/lib/utils';
export function EndpointContextCard({ endpoint }) {
    return /*#__PURE__*/ _jsx("div", {
        className: cn("fade-in slide-in-from-bottom-1 animate-in duration-150", "mx-auto w-full max-w-[var(--thread-max-width)] px-2 py-2"),
        children: /*#__PURE__*/ _jsxs("div", {
            className: "rounded-lg border border-border/60 bg-muted/20 overflow-hidden",
            children: [
                /*#__PURE__*/ _jsxs("div", {
                    className: "flex items-center gap-2 px-3 py-2 bg-muted/30 border-b border-border/40",
                    children: [
                        /*#__PURE__*/ _jsx(Crosshair, {
                            className: "h-3.5 w-3.5 text-muted-foreground",
                            weight: "bold"
                        }),
                        /*#__PURE__*/ _jsx("span", {
                            className: "text-xs font-medium text-muted-foreground",
                            children: "Asking about"
                        })
                    ]
                }),
                /*#__PURE__*/ _jsx("div", {
                    className: "p-3",
                    children: /*#__PURE__*/ _jsxs("div", {
                        className: "flex items-start gap-3",
                        children: [
                            /*#__PURE__*/ _jsx(MethodBadge, {
                                method: endpoint.method,
                                size: "sm"
                            }),
                            /*#__PURE__*/ _jsxs("div", {
                                className: "flex-1 min-w-0",
                                children: [
                                    /*#__PURE__*/ _jsx("p", {
                                        className: "text-sm font-medium text-foreground truncate",
                                        children: endpoint.name
                                    }),
                                    /*#__PURE__*/ _jsx("code", {
                                        className: "text-xs text-muted-foreground font-mono block truncate mt-0.5",
                                        children: endpoint.path
                                    }),
                                    endpoint.description && /*#__PURE__*/ _jsx("p", {
                                        className: "text-xs text-muted-foreground mt-1.5 line-clamp-2",
                                        children: endpoint.description
                                    })
                                ]
                            })
                        ]
                    })
                })
            ]
        })
    });
}
