Skip to content

The only tool you need to know what is happening and how to fix it.

3.0 KB
Raw Blame
import"./DsnmJJEf.js";import{p as F,c as N,f,s as Y,x as Z,d as a,a as G,b as H,l as u,j,e as $,n as B,t as M,o as P,q as C,m as _,g as t,h as ee,r as te}from"./BKFspo1J.js";import{i as ae}from"./COK9M2N0.js";import{c as g}from"./CWm9VMfX.js";import{A as re,a as se,b as oe,c as ne,d as le,e as ie}from"./BHE_uV_q.js";import{B as E}from"./DY5VVhnr.js";import{C as ce}from"./MFbBgGAD.js";import{a as de,p as ue}from"./BrdmM8Kw.js";import{s as fe,r as he}from"./CARHnQ8P.js";import{I as ve}from"./CM27iA0o.js";function _e(k,e){F(e,!0);let r=he(e,["$$slots","$$events","$$legacy"]);const s=[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8"}],["path",{d:"M10 12h4"}]];ve(k,fe({name:"archive"},()=>r,{get iconNode(){return s},children:(h,q)=>{var A=N(),y=f(A);Y(y,()=>e.children??Z),a(h,A)},$$slots:{default:!0}})),G()}var ge=$("<!> <!>",1),me=$('<label class="flex cursor-pointer items-center gap-2 text-sm"><!> </label>'),pe=$("<!> ",1),$e=$("<!> <!>",1),Ae=$("<!> <!> <!>",1);function Ne(k,e){F(e,!0);let r=j(!1),s=j(0),h=j(!0);H(()=>{e.open&&(u(h,!0),u(s,0),q(e.hashes))});async function q(x){if(x.length!==0)try{const w=await de.post("/pages/for-issues",{hashes:x},{projectId:ue.currentProjectId??void 0});u(s,w.count??0,!0)}catch{u(s,0)}}async function A(){u(r,!0);try{await e.onConfirm(t(s)>0&&t(h)),e.onOpenChange(!1)}catch{}finally{u(r,!1)}}function y(){t(r)||e.onOpenChange(!1)}var L=N(),J=f(L);g(J,()=>ie,(x,w)=>{w(x,{get open(){return e.open},get onOpenChange(){return e.onOpenChange},children:(K,xe)=>{var S=N(),Q=f(S);g(Q,()=>re,(R,T)=>{T(R,{children:(U,be)=>{var V=Ae(),z=f(V);g(z,()=>se,(n,l)=>{l(n,{children:(v,I)=>{var i=ge(),m=f(i);g(m,()=>oe,(c,p)=>{p(c,{children:(o,b)=>{B();var d=M();P(()=>C(d,`Archive Issue${e.count>1?"s":""}`)),a(o,d)},$$slots:{default:!0}})});var O=_(m,2);g(O,()=>ne,(c,p)=>{p(c,{children:(o,b)=>{B();var d=M();P(()=>C(d,`Are you sure you want to archive ${e.count??""} issue${e.count>1?"s":""}? Archived issues will
				be hidden from the main issues list.`)),a(o,d)},$$slots:{default:!0}})}),a(v,i)},$$slots:{default:!0}})});var D=_(z,2);{var W=n=>{var l=me(),v=ee(l);ce(v,{get checked(){return t(h)},onCheckedChange:i=>u(h,i===!0),get disabled(){return t(r)},"aria-label":"Also resolve linked on-call pages"});var I=_(v);te(l),P(()=>C(I,` Also resolve ${t(s)??""} open on-call page${t(s)>1?"s":""} for
				${e.count>1?"these issues":"this issue"}`)),a(n,l)};ae(D,n=>{t(s)>0&&n(W)})}var X=_(D,2);g(X,()=>le,(n,l)=>{l(n,{children:(v,I)=>{var i=$e(),m=f(i);E(m,{variant:"outline",onclick:y,get disabled(){return t(r)},children:(c,p)=>{B();var o=M("Cancel");a(c,o)},$$slots:{default:!0}});var O=_(m,2);E(O,{variant:"destructiveOutline",onclick:A,get disabled(){return t(r)},children:(c,p)=>{var o=pe(),b=f(o);_e(b,{class:"h-4 w-4"});var d=_(b);P(()=>C(d,` ${t(r)?"Archiving...":"Archive"}`)),a(c,o)},$$slots:{default:!0}}),a(v,i)},$$slots:{default:!0}})}),a(U,V)},$$slots:{default:!0}})}),a(K,S)},$$slots:{default:!0}})}),a(k,L),G()}export{Ne as A,_e as a};