var T=Object.defineProperty;var m=Object.getOwnPropertySymbols;var w=Object.prototype.hasOwnProperty,z=Object.prototype.propertyIsEnumerable;var j=(r,s,n)=>s in r?T(r,s,{enumerable:!0,configurable:!0,writable:!0,value:n}):r[s]=n,b=(r,s)=>{for(var n in s||(s={}))w.call(s,n)&&j(r,n,s[n]);if(m)for(var n of m(s))z.call(s,n)&&j(r,n,s[n]);return r};import{r as y,j as e}from"./main-406.js";import{_ as a,L as f}from"./bi.394.85.js";import{b as I}from"./bi.773.810.js";import{T as N,t as S}from"./bi.150.760.js";function R({formID:r,kirimEmailConf:s,setKirimEmailConf:n,step:p,setstep:v,isLoading:u,setIsLoading:L,setSnackbar:A,redirectLocation:P,isInfo:i}){const[o,_]=y.useState(!1),[l,h]=y.useState({api_key:""}),{kirimEmail:t}=S,k=()=>{setTimeout(()=>{document.getElementById("btcd-settings-wrp").scrollTop=0},300),v(2)},c=d=>{const x=b({},s),g=b({},l);g[d.target.name]="",x[d.target.name]=d.target.value,h(g),n(x)};return e.jsxs("div",{className:"btcd-stp-page",style:{width:p===1&&900,height:p===1&&"auto"},children:[(t==null?void 0:t.youTubeLink)&&e.jsx(N,{title:t==null?void 0:t.title,youTubeLink:t==null?void 0:t.youTubeLink}),(t==null?void 0:t.docLink)&&e.jsx(N,{title:t==null?void 0:t.title,docLink:t==null?void 0:t.docLink}),e.jsx("div",{className:"mt-3",children:e.jsx("b",{children:a("Integration Name:","bit-integrations")})}),e.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:c,name:"name",value:s.name,type:"text",placeholder:a("Integration Name...","bit-integrations"),disabled:i}),e.jsx("div",{className:"mt-3",children:e.jsx("b",{children:a("Your username:","bit-integrations")})}),e.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:c,name:"userName",value:s.userName,type:"text",placeholder:a("username...","bit-integrations"),disabled:i}),e.jsx("div",{style:{color:"red"},children:l.userName}),e.jsx("div",{className:"mt-3",children:e.jsx("b",{children:a("App api key:","bit-integrations")})}),e.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:c,name:"api_key",value:s.api_key,type:"text",placeholder:a("Api key...","bit-integrations"),disabled:i}),e.jsx("div",{style:{color:"red"},children:l.api_key}),e.jsxs("small",{className:"d-blk mt-5",children:[a("To get Api key , Please Visit   ","bit-integrations"),e.jsx("a",{className:"btcd-link",href:"https://aplikasi.kirim.email/",target:"_blank",rel:"noreferrer",children:a("Kirim Email ","bit-integrations")})]}),e.jsx("br",{}),e.jsx("br",{}),!i&&e.jsxs(e.Fragment,{children:[e.jsxs("button",{onClick:()=>I(s,n,h,_,L,A),className:"btn btcd-btn-lg purple sh-sm flx",type:"button",disabled:o||u,children:[o?a("Authorized ✔","bit-integrations"):a("Authorize","bit-integrations"),u&&e.jsx(f,{size:"20",clr:"#022217",className:"ml-2"})]}),e.jsx("br",{}),e.jsxs("button",{onClick:k,className:"btn f-right btcd-btn-lg purple sh-sm flx",type:"button",disabled:!o,children:[a("Next","bit-integrations"),e.jsx("div",{className:"btcd-icn icn-arrow_back rev-icn d-in-b"})]})]})]})}export{R as default};
