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