var k=Object.defineProperty;var p=Object.getOwnPropertySymbols;var w=Object.prototype.hasOwnProperty,z=Object.prototype.propertyIsEnumerable;var x=(t,e,s)=>e in t?k(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s,l=(t,e)=>{for(var s in e||(e={}))w.call(e,s)&&x(t,s,e[s]);if(p)for(var s of p(e))z.call(e,s)&&x(t,s,e[s]);return t};import{j as n,_ as a}from"./main.2.8.10.js";import{b as h}from"./react-router.DMwpH23k.js";import{y as E}from"./Note.DalStCGz.js";import{d as f}from"./MailsterCommonFunc.Dwztgq2W.js";import{T as A}from"./TutorialLink.D6K_DiHL.js";import"./react-vendor.P7K3d6op.js";import"./CopyIcn.BnhKHfEP.js";function P({mailsterConf:t,setMailsterConf:e,step:s,setStep:g,loading:r,setLoading:j,isInfo:d}){const[i,N]=h.useState(!1),[o,m]=h.useState({name:""}),v=()=>{setTimeout(()=>{document.getElementById("btcd-settings-wrp").scrollTop=0},300),t!=null&&t.default,g(2)},y=c=>{const b=l({},t),u=l({},o);u[c.target.name]="",b[c.target.name]=c.target.value,m(u),e(b)};return n.jsxs("div",{className:"btcd-stp-page",style:{width:s===1&&900,height:s===1&&"auto"},children:[n.jsx(A,{linkKey:"mailster"}),n.jsx("div",{className:"mt-3",children:n.jsx("b",{children:a("Integration Name:","bit-integrations")})}),n.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:y,name:"name",value:t.name,type:"text",placeholder:a("Integration Name...","bit-integrations"),disabled:d}),o.name&&n.jsx("div",{style:{color:"red",fontSize:"15px"},children:o.name}),n.jsx("br",{}),!d&&n.jsxs("div",{children:[n.jsxs("button",{onClick:()=>f(t,e,m,N,r,j),className:"btn btcd-btn-lg purple sh-sm flx",type:"button",disabled:i||r.auth,children:[i?a("Connected ✔","bit-integrations"):a("Connect to Mailster","bit-integrations"),r.auth&&n.jsx(E,{size:"20",clr:"#022217",className:"ml-2"})]}),n.jsx("br",{}),n.jsxs("button",{onClick:v,className:"btn ml-auto btcd-btn-lg purple sh-sm flx",type:"button",disabled:!i,children:[a("Next","bit-integrations"),n.jsx("div",{className:"btcd-icn icn-arrow_back rev-icn d-in-b"})]})]})]})}export{P as default};
