var A=Object.defineProperty;var x=Object.getOwnPropertySymbols;var k=Object.prototype.hasOwnProperty,P=Object.prototype.propertyIsEnumerable;var g=(e,s,r)=>s in e?A(e,s,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[s]=r,d=(e,s)=>{for(var r in s||(s={}))k.call(s,r)&&g(e,r,s[r]);if(x)for(var r of x(s))P.call(s,r)&&g(e,r,s[r]);return e};import{_ as a,j as t}from"./main.2.8.10.js";import{b as j}from"./react-router.DMwpH23k.js";import{y as f,a9 as E}from"./Note.DalStCGz.js";import{b as U,a as $}from"./RapidmailCommonFunc.Btxh9TPt.js";import{T as S}from"./TutorialLink.D6K_DiHL.js";import"./react-vendor.P7K3d6op.js";import"./CopyIcn.BnhKHfEP.js";function q({rapidmailConf:e,setRapidmailConf:s,step:r,setstep:y,isLoading:b,setIsLoading:m,setSnackbar:N,isInfo:i}){const[n,w]=j.useState(!1),[o,u]=j.useState({username:"",password:""}),v=()=>{setTimeout(()=>{document.getElementById("btcd-settings-wrp").scrollTop=0},300),!(e!=null&&e.default)&&$(e,s,m),y(2)},l=c=>{const p=d({},e),h=d({},o);h[c.target.name]="",p[c.target.name]=c.target.value,u(h),s(p)},z=`
    <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:r===1&&900,height:r===1&&"auto"},children:[t.jsx(S,{linkKey:"rapidmail"}),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:l,name:"name",value:e.name,type:"text",placeholder:a("Integration Name...","bit-integrations"),disabled:i}),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:l,name:"username",value:e.username,type:"text",placeholder:a("User Name...","bit-integrations"),disabled:i}),t.jsx("div",{style:{color:"red"},children:o.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:l,name:"password",value:e.password,type:"text",placeholder:a("Password...","bit-integrations"),disabled:i}),t.jsx("div",{style:{color:"red"},children:o.password}),!i&&t.jsxs("div",{children:[t.jsxs("button",{onClick:()=>U(e,s,u,w,m,N),className:"btn btcd-btn-lg purple sh-sm flx",type:"button",disabled:n||b,children:[n?a("Authorized ✔","bit-integrations"):a("Authorize","bit-integrations"),b&&t.jsx(f,{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:!n,children:[a("Next","bit-integrations"),t.jsx("div",{className:"btcd-icn icn-arrow_back rev-icn d-in-b"})]})]}),t.jsx(E,{note:z})]})}export{q as default};
