var _=Object.defineProperty;var x=Object.getOwnPropertySymbols;var f=Object.prototype.hasOwnProperty,w=Object.prototype.propertyIsEnumerable;var g=(i,t,s)=>t in i?_(i,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):i[t]=s,d=(i,t)=>{for(var s in t||(t={}))f.call(t,s)&&g(i,s,t[s]);if(x)for(var s of x(t))w.call(t,s)&&g(i,s,t[s]);return i};import{j as e,_ as a}from"./main.2.9.0.js";import{b as j}from"./react-router.DMwpH23k.js";import{y as z}from"./Note.NSUdvR3c.js";import{b as T}from"./KirimEmailCommonFunc.w54HbAPI.js";import{T as E}from"./TutorialLink.CFG7bS5c.js";import"./react-vendor.P7K3d6op.js";import"./CopyIcn.CEA_lFLo.js";function R({formID:i,kirimEmailConf:t,setKirimEmailConf:s,step:m,setstep:N,isLoading:p,setIsLoading:y,setSnackbar:k,redirectLocation:I,isInfo:r}){const[n,v]=j.useState(!1),[l,b]=j.useState({api_key:""}),A=()=>{setTimeout(()=>{document.getElementById("btcd-settings-wrp").scrollTop=0},300),N(2)},o=c=>{const h=d({},t),u=d({},l);u[c.target.name]="",h[c.target.name]=c.target.value,b(u),s(h)};return e.jsxs("div",{className:"btcd-stp-page",style:{width:m===1&&900,height:m===1&&"auto"},children:[e.jsx(E,{linkKey:"kirimEmail"}),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:o,name:"name",value:t.name,type:"text",placeholder:a("Integration Name...","bit-integrations"),disabled:r}),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:o,name:"userName",value:t.userName,type:"text",placeholder:a("username...","bit-integrations"),disabled:r}),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:o,name:"api_key",value:t.api_key,type:"text",placeholder:a("Api key...","bit-integrations"),disabled:r}),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",{}),!r&&e.jsxs(e.Fragment,{children:[e.jsxs("button",{onClick:()=>T(t,s,b,v,y,k),className:"btn btcd-btn-lg purple sh-sm flx",type:"button",disabled:n||p,children:[n?a("Authorized ✔","bit-integrations"):a("Authorize","bit-integrations"),p&&e.jsx(z,{size:"20",clr:"#022217",className:"ml-2"})]}),e.jsx("br",{}),e.jsxs("button",{onClick:A,className:"btn f-right btcd-btn-lg purple sh-sm flx",type:"button",disabled:!n,children:[a("Next","bit-integrations"),e.jsx("div",{className:"btcd-icn icn-arrow_back rev-icn d-in-b"})]})]})]})}export{R as default};
