import{L as e,a as t,b as n,c as r,d as i,f as a,i as o,rt as s,s as c,tt as l,u}from"./runtime-core.esm-bundler.BCIfMFaf.js";import{a as d,g as f,o as p}from"./index.ChkmaRqp.js";var m={class:`tw-p-4`},h={key:0,class:`tw-flex tw-flex-col tw-gap-2`},g={class:`tw-text-12`},_=[`href`],v={class:`flex-text-block`},y=[`href`],b={class:`index`},x={key:0},S=[`innerHTML`],C={key:1},w=a({__name:`ContextPopup`,props:{issue:{},renderedLabels:{},errorMessage:{}},setup(a){let w=a,T=o(()=>w.issue?new Date(w.issue.created_at).toLocaleDateString(void 0,{year:`numeric`,month:`short`,day:`numeric`}):``),E=o(()=>{if(!w.issue)return``;let e=w.issue.body.replace(/\n+/g,` `);return e.length>85?`${e.substring(0,85)}…`:e});return(o,w)=>(n(),r(`div`,m,[a.issue?(n(),r(`div`,h,[t(`div`,g,[t(`a`,{href:a.issue.repository.html_url,class:`muted`},s(a.issue.repository.full_name),9,_),u(` on `+s(T.value),1)]),t(`div`,v,[i(e(f),{name:e(p)(a.issue),class:l(e(d)(a.issue))},null,8,[`name`,`class`]),t(`a`,{href:a.issue.html_url,class:`issue-title tw-font-semibold tw-break-anywhere muted`},[u(s(a.issue.title)+` `,1),t(`span`,b,`#`+s(a.issue.number),1)],8,y)]),E.value?(n(),r(`div`,x,s(E.value),1)):c(``,!0),a.issue.labels.length?(n(),r(`div`,{key:1,innerHTML:a.renderedLabels},null,8,S)):c(``,!0)])):(n(),r(`div`,C,s(a.errorMessage),1))]))}});export{w as default};
//# sourceMappingURL=ContextPopup.C7XmiDBd.js.map