var _=Object.defineProperty;var j=Object.getOwnPropertySymbols;var z=Object.prototype.hasOwnProperty,I=Object.prototype.propertyIsEnumerable;var N=(i,e,r)=>e in i?_(i,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):i[e]=r,u=(i,e)=>{for(var r in e||(e={}))z.call(e,r)&&N(i,r,e[r]);if(j)for(var r of j(e))I.call(e,r)&&N(i,r,e[r]);return i};import{r as d,j as t}from"./main-406.js";import{_ as n,L,N as P}from"./bi.394.85.js";import{f as g,b as w}from"./bi.133.829.js";import{T as A,t as E}from"./bi.150.760.js";function D({getResponseConf:i,setGetResponseConf:e,step:r,setstep:T,loading:s,setLoading:b,setSnackbar:S,isInfo:o}){const[l,y]=d.useState(!1),[m,h]=d.useState({name:"",auth_token:""}),{getResponse:a}=E;d.useEffect(()=>{l&&g(i,e,b,"default")},[l]);const f=()=>{setTimeout(()=>{document.getElementById("btcd-settings-wrp").scrollTop=0},300),i!=null&&i.default,T(2)},x=c=>{const k=u({},i),p=u({},m);p[c.target.name]="",k[c.target.name]=c.target.value,h(p),e(k)},v=`
    <h4> Step of generate API token:</h4>
    <ul>
      <li>Goto <a target="_blank" href="https://app.getresponse.com/api">Generate API Token</a></li>
      <li>Copy the <b>Token</b> and paste into <b>API Token</b> field of your authorization form.</li>
      <li>Finally, click <b>Authorize</b> button.</li>
  </ul>
  `;return t.jsxs("div",{className:"btcd-stp-page",style:{width:r===1&&900,height:r===1&&"auto"},children:[(a==null?void 0:a.youTubeLink)&&t.jsx(A,{title:a==null?void 0:a.title,youTubeLink:a==null?void 0:a.youTubeLink}),(a==null?void 0:a.docLink)&&t.jsx(A,{title:a==null?void 0:a.title,docLink:a==null?void 0:a.docLink}),t.jsx("div",{className:"mt-3",children:t.jsx("b",{children:n("Integration Name:","bit-integrations")})}),t.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:x,name:"name",value:i.name,type:"text",placeholder:n("Integration Name...","bit-integrations"),disabled:o}),t.jsx("div",{className:"mt-3",children:t.jsx("b",{children:n("API Token:","bit-integrations")})}),t.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:x,name:"auth_token",value:i.auth_token,type:"text",placeholder:n("API Token...","bit-integrations"),disabled:o}),t.jsx("div",{style:{color:"red",fontSize:"15px"},children:m.auth_token}),t.jsxs("small",{className:"d-blk mt-3",children:[n("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:n("GetResponse API Token","bit-integrations")})]}),t.jsx("br",{}),t.jsx("br",{}),!o&&t.jsxs("div",{children:[t.jsxs("button",{onClick:()=>w(i,e,h,y,s,b,"authentication"),className:"btn btcd-btn-lg purple sh-sm flx",type:"button",disabled:l||s.auth,children:[l?n("Authorized ✔","bit-integrations"):n("Authorize","bit-integrations"),s.auth&&t.jsx(L,{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:!l,children:[n("Next","bit-integrations"),t.jsx("div",{className:"btcd-icn icn-arrow_back rev-icn d-in-b"})]})]}),t.jsx(P,{note:v})]})}export{D as default};
