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