import{j as r}from"./iframe-B8FSoBNY.js";import{c as n}from"./compiler-runtime-BXE7OOXE.js";import{r as c}from"./full-conversation-normalized-LUbl1coD.js";import{C as e}from"./ai-message-DLdAGhWH.js";import{R as m}from"./ai-response-ySM6s0iN.js";import{B as l}from"./index-B0y2_lLF.js";import{S as d}from"./stack-CN4X31TA.js";import"./preload-helper-PPVm8Dsz.js";import"./create-slot-recipe-context-DAhDE6G_.js";import"./factory-DAJZwK4o.js";import"./create-recipe-context-BU56IzEo.js";import"./collaborative-markdown-editor-Bj0GvTvv.js";import"./rich-text-theme-Bkhh9rAZ.js";import"./index-DaXC_qY_.js";import"./index-DpB4ozcR.js";import"./flex-DAJL4AFZ.js";import"./CodeBlockPlugin-C3OWpvP8.js";import"./index-cFwdnc0b.js";import"./textarea-rqmaWSc5.js";import"./factory-BR3bc_RM.js";import"./use-field-context-DoxKQlMm.js";import"./computed-style-C0hzrq9-.js";import"./table-BKNSzs2r.js";import"./FloatingTextFormatToolbarPlugin-B6jc8xvg.js";import"./resource-badge-Bw5UoU4J.js";import"./createLucideIcon-CcBBUKX8.js";import"./file-text-D5m8MJlG.js";import"./tooltip-DZxUoouw.js";import"./portal-CZHfPTRw.js";import"./normalize-props-D7NI5JRu.js";import"./tooltip-C_a-XGZ8.js";import"./use-presence-context-DK2PGZth.js";import"./create-split-props-u5h9OPvL.js";import"./overflow-CkG1DOya.js";import"./icon-button-DHiUe7rR.js";import"./button-C7it2n8t.js";import"./spinner-ZYH_gvW-.js";import"./index-CXwl6T4k.js";import"./x-D42ziktz.js";import"./markdown-editor-Y4eMsgVb.js";import"./LexicalHistoryPlugin.prod-BQAibkDj.js";import"./TreeViewPlugin-CyVKCrKJ.js";import"./markdown-BLUemkxK.js";import"./prompt-input-BLCttowi.js";import"./rich-message-BIkzo1SM.js";const a=c,p=t=>t.parts?.find(o=>o.type==="text"&&"text"in o)?.text,f=a.filter(t=>t.role==="user").map(p).find(Boolean)??"No user message available.",x=a.filter(t=>t.role==="assistant").map(p).find(t=>typeof t=="string"&&t.length>0)??"No assistant message available.",at={title:"Chat UI/AI Message",component:e.Root,parameters:{layout:"padded"}},h=()=>{const t=n.c(2);let o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o=r.jsx(e.Root,{from:"user",children:r.jsx(e.Content,{from:"user",children:r.jsx(m,{height:"auto",children:f})})}),t[0]=o):o=t[0];let s;return t[1]===Symbol.for("react.memo_cache_sentinel")?(s=r.jsx(l,{maxW:"960px",w:"full",borderWidth:"1px",borderRadius:"md",bg:"bg",p:"md",children:r.jsxs(d,{gap:"sm",children:[o,r.jsx(e.Root,{from:"assistant",children:r.jsx(e.Content,{from:"assistant",children:r.jsx(m,{height:"auto",children:x})})})]})}),t[1]=s):s=t[1],s},i={render:()=>r.jsx(h,{})};i.parameters={...i.parameters,docs:{...i.parameters?.docs,source:{originalSource:`{
  render: () => <MessagePreview />
}`,...i.parameters?.docs?.source}}};const pt=["UserAndAssistant"];export{i as UserAndAssistant,pt as __namedExportsOrder,at as default};
