PageSourceSearch

https://www.promoamp.com/_app/immutable/nodes/28.DF3obV8X.js

js promoamp.com collected 2026-10-03 21:28:37 UTC 5,144 bytes, 3 lines download raw bytes

1import"../chunks/NZTpNUN0.js";import{o as ot}from"../chunks/DCDCaYga.js";import{p as st,F as nt,l as f,v as M,a as s,b as it,s as lt,c as g,f as b,e as ct,o as e,n as w,r as v,d as m,i as O,g as T,j as n,t as mt}from"../chunks/CswluXHk.js";import{s as dt}from"../chunks/D5MUd0dc.js";import{i as Y}from"../chunks/Cvwav-Rz.js";import{c as $}from"../chunks/DCqg9Lcd.js";import{d as ut,a as pt}from"../chunks/BnZqlU5Q.js";import{p as ft}from"../chunks/BGX793Ew.js";import{g as gt}from"../chunks/DvabIYvy.js";import{I as vt}from"../chunks/DuX34-Zw.js";import{C as ht}from"../chunks/BFGY4aR1.js";import{C as _t}from"../chunks/C3F0Z4bJ.js";import{C as yt,a as $t,b as bt}from"../chunks/DQXZ4mXD.js";import{C as xt}from"../chunks/BcsrqGLJ.js";import"../chunks/aH0YTA77.js";import{t as E}from"../chunks/CFi-xeDB.js";import{B as z}from"../chunks/DltdByd6.js";import{A as kt}from"../chunks/r7UZdRXb.js";var Ct=b("<!> <!>",1),It=b('<p class="text-red-500 text-sm"> </p>'),wt=b('<form class="space-y-4"><div class="space-y-4"><div class="space-y-2"><label for="authToken" class="text-sm font-medium">Auth Token</label> <!></div></div> <!></form>'),At=b('<div class="flex items-center gap-4"><p class="text-sm text-gray-500">Need help getting your auth token? You can find your auth token <a class="text-blue-500 underline" href="https://acumbamail.com/en/apidoc/" target="_blank">here</a>.</p></div> <div class="space-x-2"><!> <!></div>',1),Tt=b("<!> <!> <!>",1),Et=b('<div class="mb-20"><button class="flex items-center text-sm text-gray-600 hover:text-gray-900 mb-4"><!> Back to Integrations</button> <!></div>');function Qt(G,H){st(H,!0);const K=()=>ct(ft,"$page",Q),[Q,U]=lt(),{currentTeam:h}=nt("user");let _=f(M(h.team.acumbamailIntegration?.config?.auth_token||"")),B=f(!1),c=f(""),V=f(!!h.team.acumbamailIntegration),N=f(M(h.team.acumbamailIntegration)),P=f(!1),j=f(!1);ot(async()=>{await W()});async function W(){try{e(B,!0);const t=await fetch("/api/integrations/connected",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({teamId:h.team.id})});if(t.ok){const x=(await t.json()).connectedIntegrations?.find(J=>J.service==="acumbamail");x&&(e(N,x,!0),e(_,x.config?.auth_token||"",!0),e(V,!0))}}catch(t){console.error("Error fetching existing integration:",t)}finally{e(B,!1)}}async function X(){try{if(e(c,""),e(P,!0),!n(_)){e(c,"Auth Token is required");return}const t=await fetch("/api/install/acumbamail",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({teamId:h.team.id,config:{auth_token:n(_)}})}),y=await t.json();if(!t.ok)throw new Error(y.error||"Failed to save integration");E.success("Acumbamail integration saved successfully",{position:"top-right"})}catch(t){console.error("Error saving Acumbamail integration:",t),e(c,t.message||"Failed to save integration",!0),E.error(n(c),{position:"top-right"})}finally{e(P,!1)}}async function Z(){try{e(j,!0);const t=await fetch("/api/install/acumbamail",{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({teamId:h.team.id})}),y=await t.json();if(!t.ok)throw new Error(y.error||"Failed to remove integration");e(_,""),E.success("Acumbamail integration removed successfully",{position:"top-right"})}catch(t){console.error("Error removing Acumbamail integration:",t),e(c,t.message||"Failed to remove integration",!0),E.error(n(c),{position:"top-right"})}finally{e(j,!1)}}function tt(){gt(`/brand/${K().params.teamSlug}/settings/integrations`)}var S=Et(),A=g(S),et=g(A);kt(et,{class:"w-4 h-4 mr-1"}),w(),v(A);var at=m(A,2);$(at,()=>ht,(t,y)=>{y(t,{class:"my-4",children:(x,J)=>{var L=Tt(),R=O(L);$(R,()=>yt,(k,C)=>{C(k,{children:(I,D)=>{var i=Ct(),l=O(i);$(l,()=>$t,(u,p)=>{p(u,{class:"text-lg font-semibold",children:(a,r)=>{w();var o=T("Acumbamail Integration");s(a,o)},$$slots:{default:!0}})});var d=m(l,2);$(d,()=>bt,(u,p)=>{p(u,{children:(a,r)=>{w();var o=T(`Connect your Acumbamail account to automatically add competition entries
2        to your mailing lists.`);s(a,o)},$$slots:{default:!0}})}),s(I,i)},$$slots:{default:!0}})});var q=m(R,2);$(q,()=>_t,(k,C)=>{C(k,{children:(I,D)=>{var i=wt(),l=g(i),d=g(l),u=m(g(d),2);vt(u,{id:"authToken",type:"text",placeholder:"Enter your Acumbamail auth token",class:"w-full",get value(){return n(_)},set value(r){e(_,r,!0)}}),v(d),v(l);var p=m(l,2);{var a=r=>{var o=It(),F=g(o,!0);v(o),mt(()=>dt(F,n(c))),s(r,o)};Y(p,r=>{n(c)&&r(a)})}v(i),s(I,i)},$$slots:{default:!0}})});var rt=m(q,2);$(rt,()=>xt,(k,C)=>{C(k,{class:"flex justify-between items-center border-t bg-gray-50 rounded-b-[11px] py-4",children:(I,D)=>{var i=At(),l=m(O(i),2),d=g(l);{var u=a=>{z(a,{variant:"destructive",onclick:Z,get isLoading(){return n(j)},children:(r,o)=>{w();var F=T("Remove Connection");s(r,F)},$$slots:{default:!0}})};Y(d,a=>{n(N)&&a(u)})}var p=m(d,2);z(p,{type:"button",onclick:X,get isLoading(){return n(P)},children:(a,r)=>{w();var o=T("Save Integration");s(a,o)},$$slots:{default:!0}}),v(l),s(I,i)},$$slots:{default:!0}})}),s(x,L)},$$slots:{default:!0}})}),v(S),pt("click",A,tt),s(G,S),it(),U()}ut(["click"]);export{Qt as component};
3//# sourceMappingURL=28.DF3obV8X.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.