import { jsxs as c, jsx as i } from "react/jsx-runtime";
import { Button as l } from "../ui/button.es.js";
import { ChevronLeft as a, ChevronRight as h } from "lucide-react";
function f({
  branch: o,
  branchOptions: t,
  onSelect: n,
  isLoading: r
}) {
  if (t.length <= 1) return null;
  const e = t.indexOf(o);
  if (e === -1) return null;
  const s = t.length;
  return /* @__PURE__ */ c("div", { className: "flex items-center gap-2 text-xs text-zinc-500", children: [
    /* @__PURE__ */ i(
      l,
      {
        variant: "ghost",
        size: "icon",
        className: "size-6 p-1 h-6 w-6 hover:bg-zinc-800 hover:text-zinc-300",
        onClick: () => n(t[e - 1]),
        disabled: r || e === 0,
        title: "Previous response",
        children: /* @__PURE__ */ i(a, { className: "h-4 w-4" })
      }
    ),
    /* @__PURE__ */ c("span", { className: "text-xs text-zinc-400 font-medium min-w-[3rem] text-center", children: [
      e + 1,
      " / ",
      s
    ] }),
    /* @__PURE__ */ i(
      l,
      {
        variant: "ghost",
        size: "icon",
        className: "size-6 p-1 h-6 w-6 hover:bg-zinc-800 hover:text-zinc-300",
        onClick: () => n(t[e + 1]),
        disabled: r || e === s - 1,
        title: "Next response",
        children: /* @__PURE__ */ i(h, { className: "h-4 w-4" })
      }
    )
  ] });
}
export {
  f as BranchSwitcher
};
//# sourceMappingURL=BranchSwitcher.es.js.map
