var P=Object.defineProperty;var x=Object.getOwnPropertySymbols;var f=Object.prototype.hasOwnProperty,z=Object.prototype.propertyIsEnumerable;var g=(e,n,a)=>n in e?P(e,n,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[n]=a,b=(e,n)=>{for(var a in n||(n={}))f.call(n,a)&&g(e,a,n[a]);if(x)for(var a of x(n))z.call(n,a)&&g(e,a,n[a]);return e};import{_ as i,j as t}from"./main.2.8.1.js";import{d as k}from"./react-router-dom.9mCuUg3q.js";import{z as I,a9 as _}from"./Note.BeM7sN-p.js";import{m as L}from"./MailBlusterCommonFunc.DXbDz0mm.js";import{t as w}from"./tutorialLinks.kMkIDzcD.js";import{T as j}from"./TutorialLink.BAFX--T3.js";import"./CopyIcn.3gZpHton.js";function q({mailBlusterConf:e,setMailBlusterConf:n,step:a,setStep:N,loading:o,setLoading:v,isInfo:r}){const[l,y]=k.useState(!1),[d,p]=k.useState({name:"",auth_token:""}),{mailBluster:s}=w,A=()=>{setTimeout(()=>{document.getElementById("btcd-settings-wrp").scrollTop=0},300),e!=null&&e.default,N(2)},m=c=>{const h=b({},e),u=b({},d);u[c.target.name]="",h[c.target.name]=c.target.value,p(u),n(h)},T=`
    <h4>${i("Step of generate API token:","bit-integrations")}</h4>
    <ul>
      <li>${i("Goto","bit-integrations")} <a target="_blank" href="https://app.mailbluster.com/vM7N8vG0Pp/settings/api-keys">${i("Generate API Token","bit-integrations")}</a></li>
      <li>${i("Copy the <b>Token</b> and paste into <b>API Token</b> field of your authorization form.","bit-integrations")}</li>
      <li>${i("Finally, click <b>Authorize</b> button.","bit-integrations")}</li>
  </ul>
  `;return t.jsxs("div",{className:"btcd-stp-page",style:{width:a===1&&900,height:a===1&&"auto"},children:[t.jsx(j,{title:"MailBluster",youTubeLink:s==null?void 0:s.youTubeLink}),t.jsx(j,{title:"MailBluster",docLink:s==null?void 0:s.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:m,name:"name",value:e.name,type:"text",placeholder:i("Integration Name...","bit-integrations"),disabled:r}),t.jsx("div",{className:"mt-3",children:t.jsx("b",{children:i("API Token:","bit-integrations")})}),t.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:m,name:"auth_token",value:e.auth_token,type:"text",placeholder:i("API Token...","bit-integrations"),disabled:r}),t.jsx("div",{style:{color:"red",fontSize:"15px"},children:d.auth_token}),t.jsxs("small",{className:"d-blk mt-3",children:[i("To Get API Token, Please Visit","bit-integrations")," ",t.jsx("a",{className:"btcd-link",href:"https://app.mailbluster.com/vM7N8vG0Pp/settings/api-keys",target:"_blank",rel:"noreferrer",children:i("MailBluster API Token","bit-integrations")})]}),t.jsx("br",{}),t.jsx("br",{}),!r&&t.jsxs("div",{children:[t.jsxs("button",{onClick:()=>L(e,n,p,y,o,v,"authentication"),className:"btn btcd-btn-lg purple sh-sm flx",type:"button",disabled:l||o.auth,children:[l?i("Authorized ✔","bit-integrations"):i("Authorize","bit-integrations"),o.auth&&t.jsx(I,{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"})]})]}),t.jsx(_,{note:T})]})}export{q as default};
