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