var y=Object.defineProperty;var i=Object.getOwnPropertySymbols;var A=Object.prototype.hasOwnProperty,z=Object.prototype.propertyIsEnumerable;var j=(e,t,r)=>t in e?y(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,m=(e,t)=>{for(var r in t||(t={}))A.call(t,r)&&j(e,r,t[r]);if(i)for(var r of i(t))z.call(t,r)&&j(e,r,t[r]);return e};import{r as o,j as s,_ as a}from"./main-634.js";import{a6 as E}from"./bf-746-82.js";import{h as P}from"./bf-184-172.js";import"./bf-275-83.js";import"./bf-822-108.js";function T({rapidmailConf:e,setRapidmailConf:t,step:r,setstep:U,isLoading:b,setIsLoading:g,setSnackbar:v,isInfo:n,authorizedAction:w}){const[c,N]=o.useState(!1),[l,u]=o.useState({username:"",password:""}),d=h=>{const x=m({},e),p=m({},l);p[h.target.name]="",x[h.target.name]=h.target.value,u(p),t(x)};return o.useEffect(()=>{c&&w()},[c]),s.jsxs("div",{className:"btcd-stp-page",style:{width:900,height:"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:d,name:"name",value:e==null?void 0:e.name,type:"text",placeholder:a("Integration Name..."),disabled:n}),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:d,name:"username",value:e==null?void 0:e.username,type:"text",placeholder:a("User name..."),disabled:n}),s.jsx("div",{style:{color:"red"},children:l.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:d,name:"password",value:e==null?void 0:e.password,type:"text",placeholder:a("Password..."),disabled:n}),s.jsx("div",{style:{color:"red"},children:l.password}),!n&&s.jsxs("div",{children:[s.jsx(E,{isAuthorized:c,handleAuthorize:()=>P(e,t,u,N,g,v),isLoading:b}),s.jsx("br",{})]})]})}export{T as default};
