import { jsx as s } from "react/jsx-runtime";
import { useStreamContext as u } from "../providers/Stream.es.js";
import { useGeneratedSuggestions as g } from "../providers/useChatSuggestions.es.js";
import { LiquidButton as d } from "./ui/button.es.js";
function S() {
  const n = u().values?.suggestions, { suggestions: a, onSelect: o } = g({
    instructions: "Your are an AI assistant that suggests relevant next actions for users to take in a chat interface.",
    minSuggestions: 2,
    maxSuggestions: 4,
    suggestions: n
    // Use agent-provided suggestions if available
  }), r = 24, i = 48;
  return /* @__PURE__ */ s("div", { className: "p-2", children: /* @__PURE__ */ s("div", { className: "flex flex-wrap gap-2", children: a.map((e, l) => {
    const t = e.length, c = t <= r ? "max-w-[48%]" : t <= i ? "max-w-[72%]" : "w-full", m = () => o?.(e);
    return /* @__PURE__ */ s(
      d,
      {
        size: "sm",
        className: `${c} text-center wrap-break-word overflow-hidden`,
        onClick: m,
        children: /* @__PURE__ */ s("span", { className: "whitespace-normal line-clamp-2 text-white", children: e })
      },
      `suggestion-${l}-${e.slice(0, 20)}`
    );
  }) }) });
}
export {
  S as default
};
//# sourceMappingURL=Suggestion.es.js.map
