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