var f=Object.defineProperty;var g=Object.getOwnPropertySymbols;var P=Object.prototype.hasOwnProperty,T=Object.prototype.propertyIsEnumerable;var j=(e,s,i)=>s in e?f(e,s,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[s]=i,b=(e,s)=>{for(var i in s||(s={}))P.call(s,i)&&j(e,i,s[i]);if(g)for(var i of g(s))T.call(s,i)&&j(e,i,s[i]);return e};import{_ as a,j as t}from"./main.2.8.1.js";import{d as y}from"./react-router-dom.9mCuUg3q.js";import{z as E,a9 as L}from"./Note.BeM7sN-p.js";import{b as U,a as $}from"./RapidmailCommonFunc.DW-NWjuq.js";import{t as S}from"./tutorialLinks.kMkIDzcD.js";import{T as N}from"./TutorialLink.BAFX--T3.js";import"./CopyIcn.3gZpHton.js";function H({rapidmailConf:e,setRapidmailConf:s,step:i,setstep:w,isLoading:m,setIsLoading:u,setSnackbar:v,isInfo:r}){const[o,z]=y.useState(!1),[l,h]=y.useState({username:"",password:""}),{rapidmail:n}=S,k=()=>{setTimeout(()=>{document.getElementById("btcd-settings-wrp").scrollTop=0},300),!(e!=null&&e.default)&&$(e,s,u),w(2)},c=d=>{const p=b({},e),x=b({},l);x[d.target.name]="",p[d.target.name]=d.target.value,h(x),s(p)},A=`
    <h4>${a("Step of creating username and password:","bit-integrations")}</h4>
    <ul>
      <li>${a("Goto","bit-integrations")}Goto <a href="https://my.rapidmail.com/api/v3/userlist.html#/">Generate API User</a> and create an api user.</li>
      <li>${a("Copy the <b>Username</b> and paste into <b>Username</b> field of your authorization form.","bit-integrations")}</li>
      <li>${a("Copy the <b>Password</b> and paste into <b>Password</b> field of your authorization form.","bit-integrations")}</li>
      <li>${a("Finally, click <b>Authorize</b> button.","bit-integrations")}</li>
  </ul>
  `;return t.jsxs("div",{className:"btcd-stp-page",style:{width:i===1&&900,height:i===1&&"auto"},children:[t.jsx(N,{title:"Rapidmail",youTubeLink:n==null?void 0:n.youTubeLink}),t.jsx(N,{title:"Rapidmail",docLink:n==null?void 0:n.docLink}),t.jsx("div",{className:"mt-3",children:t.jsx("b",{children:a("Integration Name:","bit-integrations")})}),t.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:c,name:"name",value:e.name,type:"text",placeholder:a("Integration Name...","bit-integrations"),disabled:r}),t.jsx("div",{className:"mt-3",children:t.jsx("b",{children:a("User Name:","bit-integrations")})}),t.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:c,name:"username",value:e.username,type:"text",placeholder:a("User Name...","bit-integrations"),disabled:r}),t.jsx("div",{style:{color:"red"},children:l.username}),t.jsx("div",{className:"mt-3",children:t.jsx("b",{children:a("Password:","bit-integrations")})}),t.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:c,name:"password",value:e.password,type:"text",placeholder:a("Password...","bit-integrations"),disabled:r}),t.jsx("div",{style:{color:"red"},children:l.password}),!r&&t.jsxs("div",{children:[t.jsxs("button",{onClick:()=>U(e,s,h,z,u,v),className:"btn btcd-btn-lg purple sh-sm flx",type:"button",disabled:o||m,children:[o?a("Authorized ✔","bit-integrations"):a("Authorize","bit-integrations"),m&&t.jsx(E,{size:"20",clr:"#022217",className:"ml-2"})]}),t.jsx("br",{}),t.jsxs("button",{onClick:k,className:"btn ml-auto btcd-btn-lg purple sh-sm flx",type:"button",disabled:!o,children:[a("Next","bit-integrations"),t.jsx("div",{className:"btcd-icn icn-arrow_back rev-icn d-in-b"})]})]}),t.jsx(L,{note:A})]})}export{H as default};
