import{$ as b,aA as D,b as c,c as _,M as d,aa as S}from"./app-QjDgb7aF.js";import{F as k}from"./section-Dbg05qO2.js";import{b as x,c as B,w as F,j as t,p as m,u as n,g as r,i,J as a,D as o,q as u,H as h,a as v,f as G}from"./vue-Cm77DuTi.js";import"./charts-3gEHPHRq.js";import"./media-DuCIZ-3n.js";const M={class:"_formRoot"},N={key:0},T=["href"],V={key:0},H=["href"],J=x({__name:"integration",setup(I){const p=v(null),g=v(null),e=G(()=>b.integrations);function l(f,s){return window.open(`${S}/${s}/${f}`,`${f}_${s}_window`,"height=570, width=520")}function w(){p.value=l("discord","connect")}function y(){l("discord","disconnect")}function $(){g.value=l("github","connect")}function C(){l("github","disconnect")}return B(()=>{document.cookie=`igi=${b.token}; path=/; max-age=31536000;`+(document.location.protocol.startsWith("https")?" secure":""),F(e,()=>{e.value.discord&&p.value&&p.value.close(),e.value.github&&g.value&&g.value.close()})}),D({title:c.ts.integration,icon:"ph-share-network ph-bold ph-lg"}),(f,s)=>(t(),m("div",M,[n(_).enableDiscordIntegration?(t(),r(k,{key:0},{label:i(()=>[...s[0]||(s[0]=[u("i",{class:"ph-discord-logo ph-bold ph-lg"},null,-1),a(" Discord",-1)])]),default:i(()=>[e.value.discord?(t(),m("p",N,[a(o(n(c).ts.connectedTo)+": ",1),u("a",{href:`https://discord.com/users/${e.value.discord.id}`,rel:"nofollow noopener",target:"_blank"},"@"+o(e.value.discord.username)+"#"+o(e.value.discord.discriminator),9,T)])):h("",!0),e.value.discord?(t(),r(d,{key:1,danger:"",onClick:y},{default:i(()=>[a(o(n(c).ts.disconnectService),1)]),_:1})):(t(),r(d,{key:2,primary:"",onClick:w},{default:i(()=>[a(o(n(c).ts.connectService),1)]),_:1}))]),_:1})):h("",!0),n(_).enableGithubIntegration?(t(),r(k,{key:1},{label:i(()=>[...s[1]||(s[1]=[u("i",{class:"ph-github-logo ph-bold ph-lg"},null,-1),a(" GitHub",-1)])]),default:i(()=>[e.value.github?(t(),m("p",V,[a(o(n(c).ts.connectedTo)+": ",1),u("a",{href:`https://github.com/${e.value.github.login}`,rel:"nofollow noopener",target:"_blank"},"@"+o(e.value.github.login),9,H)])):h("",!0),e.value.github?(t(),r(d,{key:1,danger:"",onClick:C},{default:i(()=>[a(o(n(c).ts.disconnectService),1)]),_:1})):(t(),r(d,{key:2,primary:"",onClick:$},{default:i(()=>[a(o(n(c).ts.connectService),1)]),_:1}))]),_:1})):h("",!0)]))}});export{J as default};
//# sourceMappingURL=integration-CI2eFpU4.js.map
