var y=Object.defineProperty;var g=Object.getOwnPropertySymbols;var T=Object.prototype.hasOwnProperty,v=Object.prototype.propertyIsEnumerable;var k=(e,i,n)=>i in e?y(e,i,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[i]=n,c=(e,i)=>{for(var n in i||(i={}))T.call(i,n)&&k(e,n,i[n]);if(g)for(var n of g(i))v.call(i,n)&&k(e,n,i[n]);return e};import{_ as a,j as t}from"./main.2.8.10.js";import{b}from"./react-router.DMwpH23k.js";import{y as _,a9 as z}from"./Note.DalStCGz.js";import{f as I,b as P}from"./GetResponseCommonFunc.DbhVUseh.js";import{T as w}from"./TutorialLink.D6K_DiHL.js";import"./react-vendor.P7K3d6op.js";import"./CopyIcn.BnhKHfEP.js";function q({getResponseConf:e,setGetResponseConf:i,step:n,setstep:j,loading:s,setLoading:m,setSnackbar:E,isInfo:o}){const[r,N]=b.useState(!1),[d,u]=b.useState({name:"",auth_token:""});b.useEffect(()=>{r&&I(e,i,m,"default")},[r]);const A=()=>{setTimeout(()=>{document.getElementById("btcd-settings-wrp").scrollTop=0},300),e!=null&&e.default,j(2)},h=l=>{const p=c({},e),x=c({},d);x[l.target.name]="",p[l.target.name]=l.target.value,u(x),i(p)},f=`
    <h4>${a("Step of generate API token:","bit-integrations")}</h4>
    <ul>
      <li>${a("Goto","bit-integrations")} <a target="_blank" href="https://app.getresponse.com/api">${a("Generate API Token","bit-integrations")}</a></li>
      <li>${a("Copy the <b>Token</b> and paste into <b>API Token</b> field of your authorization form.","bit-integrations")}</li>
      <li>${a("Finally, click <b>Authorize</b> button.","bit-integrations")}</li>
  </ul>
  `;return t.jsxs("div",{className:"btcd-stp-page",style:{width:n===1&&900,height:n===1&&"auto"},children:[t.jsx(w,{linkKey:"getResponse"}),t.jsx("div",{className:"mt-3",children:t.jsx("b",{children:a("Integration Name:","bit-integrations")})}),t.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:h,name:"name",value:e.name,type:"text",placeholder:a("Integration Name...","bit-integrations"),disabled:o}),t.jsx("div",{className:"mt-3",children:t.jsx("b",{children:a("API Token:","bit-integrations")})}),t.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:h,name:"auth_token",value:e.auth_token,type:"text",placeholder:a("API Token...","bit-integrations"),disabled:o}),t.jsx("div",{style:{color:"red",fontSize:"15px"},children:d.auth_token}),t.jsxs("small",{className:"d-blk mt-3",children:[a("To Get API Token, Please Visit","bit-integrations")," ",t.jsx("a",{className:"btcd-link",href:"https://app.getresponse.com/api",target:"_blank",rel:"noreferrer",children:a("GetResponse API Token","bit-integrations")})]}),t.jsx("br",{}),t.jsx("br",{}),!o&&t.jsxs("div",{children:[t.jsxs("button",{onClick:()=>P(e,i,u,N,s,m,"authentication"),className:"btn btcd-btn-lg purple sh-sm flx",type:"button",disabled:r||s.auth,children:[r?a("Authorized ✔","bit-integrations"):a("Authorize","bit-integrations"),s.auth&&t.jsx(_,{size:"20",clr:"#022217",className:"ml-2"})]}),t.jsx("br",{}),t.jsxs("button",{onClick:A,className:"btn ml-auto btcd-btn-lg purple sh-sm flx",type:"button",disabled:!r,children:[a("Next","bit-integrations"),t.jsx("div",{className:"btcd-icn icn-arrow_back rev-icn d-in-b"})]})]}),t.jsx(z,{note:f})]})}export{q as default};
