var _=Object.defineProperty;var p=Object.getOwnPropertySymbols;var z=Object.prototype.hasOwnProperty,E=Object.prototype.propertyIsEnumerable;var g=(e,s,a)=>s in e?_(e,s,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[s]=a,d=(e,s)=>{for(var a in s||(s={}))z.call(s,a)&&g(e,a,s[a]);if(p)for(var a of p(s))E.call(s,a)&&g(e,a,s[a]);return e};import{j as t,_ as i}from"./main.2.8.1.js";import{d as j}from"./react-router-dom.9mCuUg3q.js";import{z as T}from"./Note.BeM7sN-p.js";import{e as I}from"./EmailOctopusCommonFunc.8ffb1vKO.js";import{t as L}from"./tutorialLinks.kMkIDzcD.js";import{T as k}from"./TutorialLink.BAFX--T3.js";import"./CopyIcn.3gZpHton.js";function D({emailOctopusConf:e,setEmailOctopusConf:s,step:a,setStep:N,loading:r,setLoading:y,isInfo:o}){const[l,v]=j.useState(!1),[m,b]=j.useState({name:"",auth_token:""}),{emailOctopus:n}=L,A=()=>{setTimeout(()=>{document.getElementById("btcd-settings-wrp").scrollTop=0},300),e!=null&&e.default,N(2)},u=c=>{const h=d({},e),x=d({},m);x[c.target.name]="",h[c.target.name]=c.target.value,b(x),s(h)};return t.jsxs("div",{className:"btcd-stp-page",style:{width:a===1&&900,height:a===1&&"auto"},children:[t.jsx(k,{title:"EmailOctopus",youTubeLink:n==null?void 0:n.youTubeLink}),t.jsx(k,{title:"EmailOctopus",docLink:n==null?void 0:n.docLink}),t.jsx("div",{className:"mt-3",children:t.jsx("b",{children:i("Integration Name:","bit-integrations")})}),t.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:u,name:"name",value:e.name,type:"text",placeholder:i("Integration Name...","bit-integrations"),disabled:o}),t.jsx("div",{className:"mt-3",children:t.jsx("b",{children:i("API Key:","bit-integrations")})}),t.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:u,name:"auth_token",value:e.auth_token,type:"text",placeholder:i("API Token...","bit-integrations"),disabled:o}),t.jsx("div",{style:{color:"red",fontSize:"15px"},children:m.auth_token}),t.jsxs("small",{className:"d-blk mt-3",children:[i("To get API key, please visit","bit-integrations")," ",t.jsx("a",{className:"btcd-link",href:"https://emailoctopus.com/api-documentation",target:"_blank",rel:"noreferrer",children:i("EmailOctopus API keys","bit-integrations")})]}),t.jsx("br",{}),t.jsx("br",{}),!o&&t.jsxs("div",{children:[t.jsxs("button",{onClick:()=>I(e,s,b,v,r,y,"authentication"),className:"btn btcd-btn-lg purple sh-sm flx",type:"button",disabled:l||r.auth,children:[l?i("Authorized ✔","bit-integrations"):i("Authorize","bit-integrations"),r.auth&&t.jsx(T,{size:"20",clr:"#022217",className:"ml-2"})]}),t.jsx("br",{}),t.jsxs("button",{onClick:A,className:"btn ml-auto btcd-btn-lg purple sh-sm flx",type:"button",disabled:!l,children:[i("Next","bit-integrations"),t.jsx("div",{className:"btcd-icn icn-arrow_back rev-icn d-in-b"})]})]})]})}export{D as default};
