import{_ as k}from"./Cd5yfd14.js";import{_ as b}from"./DM9QX0ua.js";import{d as w,G as C,v as m,l as x,s as I,c as n,f as h,e as r,h as s,j as N,t as e,w as P,b as c,g as V,_ as A}from"./tpFEFzWU.js";import{u as v}from"./Grz13CMP.js";const B={class:"prompt-page"},D={class:"card"},H={class:"section-header"},E={class:"session-badge"},F={key:0,class:"column-badge"},G={key:0,class:"loading"},S={key:1,class:"error-message"},j={key:2,class:"empty"},K={key:3,class:"prompt-content"},L={class:"actions"},O=w({__name:"prompt",async setup(Q){let t,i;const u=C(),p=u.params.id,d=u.params.sessionId,{data:a}=([t,i]=m(()=>v(`/api/issues/${p}`,"$a3ca3_CGOD")),t=await t,i(),t),y=x(()=>{if(!a.value)return null;const o={id:a.value.key,title:a.value.title,column:a.value.column_slug};return a.value.priority&&(o.priority=a.value.priority),o}),{data:_,status:f,error:l}=([t,i]=m(()=>v(`/api/issues/${p}/history/${d}/prompt`,"$QrPKfenAcg")),t=await t,i(),t);return I({title:`Prompt ${d} - ${p} - AutoCode`}),(o,R)=>{const $=k,g=b;return c(),n("div",B,[h($,{issue:s(y),"active-tab":"history"},null,8,["issue"]),r("div",D,[r("div",H,[r("h2",null,e(o.$t("history.viewPrompt")),1),r("span",E,e(s(d)),1),s(_)?.column?(c(),n("span",F,e(s(_).column),1)):N("",!0)]),s(f)==="pending"?(c(),n("div",G,e(o.$t("app.loading")),1)):s(l)?(c(),n("div",S,e(s(l).message),1)):s(_)?.content?(c(),n("div",K,[r("pre",null,e(s(_).content),1)])):(c(),n("div",j,e(o.$t("column.noPrompt")),1))]),r("div",L,[h(g,{to:`/issue/${s(p)}/history`,class:"btn-secondary"},{default:P(()=>[V(e(o.$t("nav.back")),1)]),_:1},8,["to"])])])}}}),M=A(O,[["__scopeId","data-v-8b8841c6"]]);export{M as default};
