var v=Object.defineProperty;var j=Object.getOwnPropertySymbols;var z=Object.prototype.hasOwnProperty,_=Object.prototype.propertyIsEnumerable;var g=(e,i,n)=>i in e?v(e,i,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[i]=n,b=(e,i)=>{for(var n in i||(i={}))z.call(i,n)&&g(e,n,i[n]);if(j)for(var n of j(i))_.call(i,n)&&g(e,n,i[n]);return e};import{_ as a,j as t}from"./main.2.8.1.js";import{d as m}from"./react-router-dom.9mCuUg3q.js";import{z as I,a9 as P}from"./Note.BeM7sN-p.js";import{f as w,b as E}from"./GetResponseCommonFunc.rAT3AcM2.js";import{t as L}from"./tutorialLinks.kMkIDzcD.js";import{T as N}from"./TutorialLink.BAFX--T3.js";import"./CopyIcn.3gZpHton.js";function J({getResponseConf:e,setGetResponseConf:i,step:n,setstep:A,loading:o,setLoading:d,setSnackbar:S,isInfo:l}){const[s,T]=m.useState(!1),[u,h]=m.useState({name:"",auth_token:""}),{getResponse:r}=L;m.useEffect(()=>{s&&w(e,i,d,"default")},[s]);const f=()=>{setTimeout(()=>{document.getElementById("btcd-settings-wrp").scrollTop=0},300),e!=null&&e.default,A(2)},p=c=>{const x=b({},e),k=b({},u);k[c.target.name]="",x[c.target.name]=c.target.value,h(k),i(x)},y=`
    <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(N,{title:"GetResponse",youTubeLink:r==null?void 0:r.youTubeLink}),t.jsx(N,{title:"GetResponse",docLink:r==null?void 0:r.docLink}),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:p,name:"name",value:e.name,type:"text",placeholder:a("Integration Name...","bit-integrations"),disabled:l}),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:p,name:"auth_token",value:e.auth_token,type:"text",placeholder:a("API Token...","bit-integrations"),disabled:l}),t.jsx("div",{style:{color:"red",fontSize:"15px"},children:u.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",{}),!l&&t.jsxs("div",{children:[t.jsxs("button",{onClick:()=>E(e,i,h,T,o,d,"authentication"),className:"btn btcd-btn-lg purple sh-sm flx",type:"button",disabled:s||o.auth,children:[s?a("Authorized ✔","bit-integrations"):a("Authorize","bit-integrations"),o.auth&&t.jsx(I,{size:"20",clr:"#022217",className:"ml-2"})]}),t.jsx("br",{}),t.jsxs("button",{onClick:f,className:"btn ml-auto btcd-btn-lg purple sh-sm flx",type:"button",disabled:!s,children:[a("Next","bit-integrations"),t.jsx("div",{className:"btcd-icn icn-arrow_back rev-icn d-in-b"})]})]}),t.jsx(P,{note:y})]})}export{J as default};
