import{_ as f,u as g,a as b,b as k,o as a,c as n,d as r,e as y,P as h,f as c,t as _,g as t}from"./index-hF81L7Il.js";const C={class:"session-toast-content"},M={key:0,class:"session-toast-row"},P={class:"session-toast-session"},B={class:"session-toast-title"},T={key:1,class:"session-toast-error"},w={__name:"SessionToastContent",props:{sessionId:{type:String,required:!0},errorMessage:{type:String,default:null},item:{type:Object,default:null}},setup(i){const s=i,l=g(),u=b(),d=k(),p=t(()=>d.getSession(s.sessionId)),m=t(()=>d.processStates[s.sessionId]),e=t(()=>p.value?.project_id||m.value?.project_id),j=t(()=>p.value?.title||m.value?.session_title||"Unknown"),v=t(()=>l.params.sessionId===s.sessionId);function I(){if(!e.value)return;l.name?.startsWith("projects-")?u.push({name:"projects-session",params:{projectId:e.value,sessionId:s.sessionId}}):u.push({name:"session",params:{projectId:e.value,sessionId:s.sessionId}}),s.item?.clear?.()}return(S,o)=>(a(),n("div",C,[e.value?(a(),n("span",M,[o[0]||(o[0]=r("span",{class:"session-toast-label"},"Project:",-1)),y(h,{"project-id":e.value,class:"session-toast-project"},null,8,["project-id"])])):c("",!0),r("span",P,[o[1]||(o[1]=r("span",{class:"session-toast-label"},"Session:",-1)),r("span",B,_(j.value),1)]),i.errorMessage?(a(),n("span",T,_(i.errorMessage),1)):c("",!0),v.value?c("",!0):(a(),n("wa-button",{key:2,size:"small",variant:"brand",appearance:"outlined",onClick:I},"Go to session"))]))}},N=f(w,[["__scopeId","data-v-b69ce41b"]]);export{N as default};
