"use strict";const s=require("react/jsx-runtime"),g=require("../providers/Stream.cjs.js"),m=require("../providers/useChatSuggestions.cjs.js"),h=require("./ui/button.cjs.js");function d(){const n=g.useStreamContext().values?.suggestions,{suggestions:a,onSelect:r}=m.useGeneratedSuggestions({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}),i=24,o=48;return s.jsx("div",{className:"p-2",children:s.jsx("div",{className:"flex flex-wrap gap-2",children:a.map((e,c)=>{const t=e.length,u=t<=i?"max-w-[48%]":t<=o?"max-w-[72%]":"w-full",l=()=>r?.(e);return s.jsx(h.LiquidButton,{size:"sm",className:`${u} text-center wrap-break-word overflow-hidden`,onClick:l,children:s.jsx("span",{className:"whitespace-normal line-clamp-2 text-white",children:e})},`suggestion-${c}-${e.slice(0,20)}`)})})})}module.exports=d;
//# sourceMappingURL=Suggestion.cjs.js.map
