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