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