import{S as C,i as k,s as w,e as g,f as v,m,a as f,b as d,g as h,h as b,j as _,q as y,o as H,C as q,W as E,Y as S,E as T,u as U,v as j,x as z,y as B,z as D,G}from"./index.65fb5956.js";function p(i,t,s){const l=i.slice();return l[6]=t[s],l}function x(i){let t,s=i[6][0]+"",l,a,e,c=i[6][1]+"",n,u;return{c(){t=g("div"),l=v(s),a=m(),e=g("div"),n=v(c),u=m(),f(t,"data-testid","bot"),f(t,"class","px-3 py-2 rounded-2xl bg-yellow-500 text-white ml-7"),f(e,"data-testid","user"),f(e,"class","px-3 py-2 rounded-2xl place-self-start bg-gray-300 dark:bg-gray-850 dark:text-gray-200 mr-7")},m(o,r){d(o,t,r),h(t,l),d(o,a,r),d(o,e,r),h(e,n),h(e,u)},p(o,r){r&1&&s!==(s=o[6][0]+"")&&b(l,s),r&1&&c!==(c=o[6][1]+"")&&b(n,c)},d(o){o&&_(t),o&&_(a),o&&_(e)}}}function W(i){let t,s,l=i[0],a=[];for(let e=0;e<l.length;e+=1)a[e]=x(p(i,l,e));return{c(){t=g("div"),s=g("div");for(let e=0;e<a.length;e+=1)a[e].c();f(s,"class","flex flex-col items-end space-y-4 p-3"),f(t,"class","overflow-y-auto h-64 border border-b-0 rounded-t-lg leading-tight")},m(e,c){d(e,t,c),h(t,s);for(let n=0;n<a.length;n+=1)a[n].m(s,null);i[3](t)},p(e,[c]){if(c&1){l=e[0];let n;for(n=0;n<l.length;n+=1){const u=p(e,l,n);a[n]?a[n].p(u,c):(a[n]=x(u),a[n].c(),a[n].m(s,null))}for(;n<a.length;n+=1)a[n].d(1);a.length=l.length}},i:y,o:y,d(e){e&&_(t),H(a,e),i[3](null)}}}function Y(i,t,s){let{value:l}=t,{style:a=""}=t,e,c;const n=q();E(()=>{c=e&&e.offsetHeight+e.scrollTop>e.scrollHeight-20}),S(()=>{c&&e.scrollTo(0,e.scrollHeight)});function u(o){T[o?"unshift":"push"](()=>{e=o,s(1,e)})}return i.$$set=o=>{"value"in o&&s(0,l=o.value),"style"in o&&s(2,a=o.style)},i.$$.update=()=>{i.$$.dirty&1&&l&&n("change")},[l,e,a,u]}class A extends C{constructor(t){super(),k(this,t,Y,W,w,{value:0,style:2})}}function F(i){let t,s;return t=new A({props:{value:i[0],style:i[1]}}),t.$on("change",i[3]),{c(){U(t.$$.fragment)},m(l,a){j(t,l,a),s=!0},p(l,[a]){const e={};a&1&&(e.value=l[0]),a&2&&(e.style=l[1]),t.$set(e)},i(l){s||(z(t.$$.fragment,l),s=!0)},o(l){B(t.$$.fragment,l),s=!1},d(l){D(t,l)}}}function I(i,t,s){let{value:l=[]}=t,{default_value:a}=t,{style:e=""}=t;a&&(l=a);function c(n){G.call(this,i,n)}return i.$$set=n=>{"value"in n&&s(0,l=n.value),"default_value"in n&&s(2,a=n.default_value),"style"in n&&s(1,e=n.style)},[l,e,a,c]}class J extends C{constructor(t){super(),k(this,t,I,F,w,{value:0,default_value:2,style:1})}}var L=J;const M=["static"];export{L as Component,M as modes};
