import{A as S}from"./CzLssp15.js";import{_ as C,a as $,b as z,c as B}from"./Bi0Cqvs9.js";import{_ as V}from"./pRipWecN.js";import{h as N,e as j,G as D,k as f,c,o as a,b as n,a as s,I as p,w as i,g as E,t as r,J as F,K as G,v as H,y as u,x as m}from"./BzhixHsn.js";const J={class:"from-background via-background to-muted/40 relative flex h-screen flex-col bg-gradient-to-b"},K={class:"flex min-w-0 items-center gap-3"},O={key:0,class:"w-64"},P={class:"flex items-center gap-2 truncate"},T={class:"truncate"},U={class:"flex items-center gap-2 truncate"},q={class:"truncate"},M={key:1,class:"flex items-center gap-2 truncate text-sm font-medium"},Q={class:"truncate"},R={key:0,class:"mt-6"},W={key:0,class:"pointer-events-none absolute right-0 bottom-0 left-0 z-50"},X={class:"pointer-events-auto p-4 md:p-5"},Y={class:"mx-auto max-w-3xl"},Z=N({__name:"Layout",props:{assistant:{},assistants:{},title:{},showLandingInput:{type:Boolean,default:!1}},emits:["selectAssistant"],setup(t,{emit:h}){const o=t,g=h,{t:ss}=j(),v=D(),x=f(()=>v.config.ui_show_assistant_dropdown!==!1),w=f(()=>{const e=x.value,_=o.assistants?.length??0;return e&&_>1}),y=e=>{g("selectAssistant",e)};return(e,_)=>{const d=S,k=$,b=B,A=z,I=C,L=V;return a(),c("div",J,[n(L,null,{default:i(()=>[s("div",K,[E(w)?(a(),c("div",O,[n(I,{"model-value":t.assistant.id,"onUpdate:modelValue":y},{default:i(()=>[n(k,{"data-testid":"assistant-select"},{default:i(()=>[s("div",P,[n(d,{assistant:t.assistant,class:"size-4"},null,8,["assistant"]),s("span",T,r(t.assistant.name),1)])]),_:1}),n(A,null,{default:i(()=>[(a(!0),c(F,null,G(t.assistants,l=>(a(),H(b,{key:l.id,value:l.id},{default:i(()=>[s("div",U,[n(d,{assistant:l,class:"size-4"},null,8,["assistant"]),s("span",q,r(l.name),1)])]),_:2},1032,["value"]))),128))]),_:1})]),_:1},8,["model-value"])])):(a(),c("div",M,[n(d,{assistant:t.assistant,class:"size-4"},null,8,["assistant"]),s("span",Q,r(t.assistant.name),1)]))])]),_:1}),s("div",{class:u(["flex-1 overflow-y-auto scroll-smooth",o.showLandingInput?"flex items-center justify-center":""])},[s("div",{class:u([o.showLandingInput?"w-full px-5":"w-full p-4 pb-52 md:p-6"])},[s("div",{class:u(["mx-auto space-y-6 leading-relaxed",o.showLandingInput?"max-w-3xl text-center":"max-w-3xl"])},[m(e.$slots,"default"),o.showLandingInput?(a(),c("div",R,[m(e.$slots,"input")])):p("",!0)],2)],2)],2),o.showLandingInput?p("",!0):(a(),c("div",W,[s("div",X,[s("div",Y,[m(e.$slots,"input")])])]))])}}}),os=Object.assign(Z,{__name:"ChatLayout"});export{os as _};
