var f=Object.defineProperty;var x=Object.getOwnPropertySymbols;var z=Object.prototype.hasOwnProperty,T=Object.prototype.propertyIsEnumerable;var h=(t,i,s)=>i in t?f(t,i,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[i]=s,l=(t,i)=>{for(var s in i||(i={}))z.call(i,s)&&h(t,s,i[s]);if(x)for(var s of x(i))T.call(i,s)&&h(t,s,i[s]);return t};import{j as e,_ as n}from"./main.2.8.1.js";import{d as g}from"./react-router-dom.9mCuUg3q.js";import{z as E}from"./Note.BeM7sN-p.js";import{n as A}from"./NewsletterCommonFunc.DTsaB5B-.js";import{t as I}from"./tutorialLinks.kMkIDzcD.js";import{T as j}from"./TutorialLink.BAFX--T3.js";import"./CopyIcn.3gZpHton.js";function F({newsletterConf:t,setNewsletterConf:i,step:s,setStep:N,loading:r,setLoading:k,isInfo:d}){const[o,v]=g.useState(!1),[c,u]=g.useState({name:""}),{newsletter:a}=I,y=()=>{setTimeout(()=>{document.getElementById("btcd-settings-wrp").scrollTop=0},300),t!=null&&t.default,N(2)},L=m=>{const b=l({},t),p=l({},c);p[m.target.name]="",b[m.target.name]=m.target.value,u(p),i(b)};return e.jsxs("div",{className:"btcd-stp-page",style:{width:s===1&&900,height:s===1&&"auto"},children:[e.jsx(j,{title:"Newsletter",youTubeLink:a==null?void 0:a.youTubeLink}),e.jsx(j,{title:"Newsletter",docLink:a==null?void 0:a.docLink}),e.jsx("div",{className:"mt-3",children:e.jsx("b",{children:n("Integration Name:","bit-integrations")})}),e.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:L,name:"name",value:t.name,type:"text",placeholder:n("Integration Name...","bit-integrations"),disabled:d}),c.name&&e.jsx("div",{style:{color:"red",fontSize:"15px"},children:c.name}),e.jsx("br",{}),!d&&e.jsxs("div",{children:[e.jsxs("button",{onClick:()=>A(t,u,v,r,k),className:"btn btcd-btn-lg purple sh-sm flx",type:"button",disabled:o||r.auth,children:[o?n("Connected ✔","bit-integrations"):n("Connect to Newsletter","bit-integrations"),r.auth&&e.jsx(E,{size:"20",clr:"#022217",className:"ml-2"})]}),e.jsx("br",{}),e.jsxs("button",{onClick:y,className:"btn ml-auto btcd-btn-lg purple sh-sm flx",type:"button",disabled:!o,children:[n("Next","bit-integrations"),e.jsx("div",{className:"btcd-icn icn-arrow_back rev-icn d-in-b"})]})]})]})}export{F as default};
