"use client";
import { jsx, jsxs } from "react/jsx-runtime";
import { ArrowLeft, Wrench, MessageSquare } from "lucide-react";
import { cn } from "@open-mercato/shared/lib/utils";
function CommandHeader({ phase, selectedTool, onBack }) {
  if (phase === "idle") {
    return null;
  }
  if (phase === "routing") {
    return /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 px-3 py-2 border-b bg-muted/30", children: [
      /* @__PURE__ */ jsx(
        "button",
        {
          type: "button",
          onClick: onBack,
          className: cn(
            "flex items-center justify-center h-6 w-6 rounded-md",
            "hover:bg-muted transition-colors",
            "text-muted-foreground hover:text-foreground"
          ),
          children: /* @__PURE__ */ jsx(ArrowLeft, { className: "h-4 w-4" })
        }
      ),
      /* @__PURE__ */ jsx("span", { className: "text-sm text-muted-foreground", children: "Processing..." })
    ] });
  }
  return /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 px-3 py-2 border-b bg-muted/30", children: [
    /* @__PURE__ */ jsx(
      "button",
      {
        type: "button",
        onClick: onBack,
        className: cn(
          "flex items-center justify-center h-6 w-6 rounded-md",
          "hover:bg-muted transition-colors",
          "text-muted-foreground hover:text-foreground"
        ),
        children: /* @__PURE__ */ jsx(ArrowLeft, { className: "h-4 w-4" })
      }
    ),
    selectedTool ? /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 flex-1 min-w-0", children: [
      /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center h-6 w-6 rounded bg-primary/10 text-primary", children: /* @__PURE__ */ jsx(Wrench, { className: "h-3 w-3" }) }),
      /* @__PURE__ */ jsx("div", { className: "flex-1 min-w-0", children: /* @__PURE__ */ jsx("p", { className: "text-sm font-medium truncate", children: selectedTool.name }) })
    ] }) : /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 flex-1 min-w-0", children: [
      /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center h-6 w-6 rounded bg-primary/10 text-primary", children: /* @__PURE__ */ jsx(MessageSquare, { className: "h-3 w-3" }) }),
      /* @__PURE__ */ jsx("div", { className: "flex-1 min-w-0", children: /* @__PURE__ */ jsx("p", { className: "text-sm font-medium truncate", children: "Chat" }) })
    ] })
  ] });
}
export {
  CommandHeader
};
//# sourceMappingURL=CommandHeader.js.map
