import{g as r,a as s}from"./index-Cza7fYcZ.chunk.mjs";import{a as m,t as i}from"./translation-DoG5ZELJ-C5oC8Tcn.chunk.mjs";import{i as a,l as o}from"./activity-B66lnZYB.chunk.mjs";import"./externalStorageUtils-CpkXDsx2.chunk.mjs";import"./index-C6ey-Mhx.chunk.mjs";import"./util-djQ-4xJ5.chunk.mjs";import"./public-C1mLBHT3.chunk.mjs";const c='',d={id:"comments-unread",title({nodes:n}){const e=n[0]?.attributes["comments-unread"];return typeof e=="number"&&e>=0?m("comments","1 new comment","{unread} new comments",e,{unread:e}):i("comments","Comment")},displayName:()=>"",iconSvgInline:()=>c,enabled({nodes:n}){const e=n[0]?.attributes?.["comments-unread"];return typeof e=="number"&&e>0},async exec({nodes:n}){if(n.length!==1||!n[0])return!1;try{const e=r(),t=a()?"activity":"comments";return e.isOpen&&e.node?.source===n[0].source?(o.debug("Sidebar already open for this node, just activating comments tab"),e.setActiveTab(t),null):(e.open(n[0],t),null)}catch(e){return o.error("Error while opening sidebar",{error:e}),!1}},inline:()=>!0,order:-140};s(d); //# sourceMappingURL=comments-init.mjs.map