var A=Object.defineProperty;var u=Object.getOwnPropertySymbols;var T=Object.prototype.hasOwnProperty,P=Object.prototype.propertyIsEnumerable;var g=(e,a,n)=>a in e?A(e,a,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[a]=n,c=(e,a)=>{for(var n in a||(a={}))T.call(a,n)&&g(e,n,a[n]);if(u)for(var n of u(a))P.call(a,n)&&g(e,n,a[n]);return e};import{_ as i,j as t}from"./main.2.9.0.js";import{b as x}from"./react-router.DMwpH23k.js";import{y as I,a9 as _}from"./Note.NSUdvR3c.js";import{m as f}from"./MailBlusterCommonFunc.CH8QTADM.js";import{T as z}from"./TutorialLink.CFG7bS5c.js";import"./react-vendor.P7K3d6op.js";import"./CopyIcn.CEA_lFLo.js";function K({mailBlusterConf:e,setMailBlusterConf:a,step:n,setStep:k,loading:s,setLoading:j,isInfo:r}){const[o,N]=x.useState(!1),[b,d]=x.useState({name:"",auth_token:""}),v=()=>{setTimeout(()=>{document.getElementById("btcd-settings-wrp").scrollTop=0},300),e!=null&&e.default,k(2)},m=l=>{const p=c({},e),h=c({},b);h[l.target.name]="",p[l.target.name]=l.target.value,d(h),a(p)},y=`
    <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:n===1&&900,height:n===1&&"auto"},children:[t.jsx(z,{linkKey:"mailBluster"}),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:b.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:()=>f(e,a,d,N,s,j,"authentication"),className:"btn btcd-btn-lg purple sh-sm flx",type:"button",disabled:o||s.auth,children:[o?i("Authorized ✔","bit-integrations"):i("Authorize","bit-integrations"),s.auth&&t.jsx(I,{size:"20",clr:"#022217",className:"ml-2"})]}),t.jsx("br",{}),t.jsxs("button",{onClick:v,className:"btn ml-auto btcd-btn-lg purple sh-sm flx",type:"button",disabled:!o,children:[i("Next","bit-integrations"),t.jsx("div",{className:"btcd-icn icn-arrow_back rev-icn d-in-b"})]})]}),t.jsx(_,{note:y})]})}export{K as default};
