var y=Object.defineProperty;var b=Object.getOwnPropertySymbols;var P=Object.prototype.hasOwnProperty,z=Object.prototype.propertyIsEnumerable;var p=(e,t,r)=>t in e?y(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,h=(e,t)=>{for(var r in t||(t={}))P.call(t,r)&&p(e,r,t[r]);if(b)for(var r of b(t))z.call(t,r)&&p(e,r,t[r]);return e};import{r as g,j as s,_ as a}from"./main-40.js";import{A as E}from"./bf-541-403.js";import{N as U}from"./bf-504-404.js";import{b as _,a as k}from"./bf-786-368.js";import"./bf-586-70.js";import"./bf-141-80.js";function $({rapidmailConf:e,setRapidmailConf:t,step:r,setstep:N,isLoading:w,setIsLoading:o,setSnackbar:v,isInfo:c}){const[u,i]=g.useState(!1),[n,x]=g.useState({username:"",password:""}),A=()=>{!(e!=null&&e.default)&&k(e,t,o),N(2),document.querySelector(".btcd-s-wrp").scrollTop=0},l=d=>{const m=h({},e),j=h({},n);j[d.target.name]="",m[d.target.name]=d.target.value,x(j),t(m)};return s.jsxs("div",{className:"btcd-stp-page",style:{width:r===1&&900,height:r===1&&"100%"},children:[s.jsx("div",{className:"mt-3",children:s.jsx("b",{children:a("Integration Name:")})}),s.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:l,name:"name",value:e==null?void 0:e.name,type:"text",placeholder:a("Integration Name..."),disabled:c}),s.jsxs("small",{className:"d-blk mt-5",children:[a("To get Username and Password , Please Visit")," ",s.jsx("a",{className:"btcd-link",href:"https://my.rapidmail.com/api/v3/userlist.html#/",target:"_blank",rel:"noreferrer",children:a("Create API User")})]}),s.jsx("div",{className:"mt-3",children:s.jsx("b",{children:a("User Name:")})}),s.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:l,name:"username",value:e==null?void 0:e.username,type:"text",placeholder:a("User name..."),disabled:c}),s.jsx("div",{style:{color:"red"},children:n.username}),s.jsx("div",{className:"mt-3",children:s.jsx("b",{children:a("Password:")})}),s.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:l,name:"password",value:e==null?void 0:e.password,type:"text",placeholder:a("Password..."),disabled:c}),s.jsx("div",{style:{color:"red"},children:n.password}),!c&&s.jsxs("div",{children:[s.jsx(E,{isAuthorized:u,handleAuthorize:()=>_(e,t,x,i,o,v),isLoading:w}),s.jsx("br",{}),s.jsx(U,{nextPageHandler:()=>A(),disabled:!u})]})]})}export{$ as default};
