var I=Object.defineProperty;var p=Object.getOwnPropertySymbols;var v=Object.prototype.hasOwnProperty,z=Object.prototype.propertyIsEnumerable;var x=(n,s,e)=>s in n?I(n,s,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[s]=e,c=(n,s)=>{for(var e in s||(s={}))v.call(s,e)&&x(n,e,s[e]);if(p)for(var e of p(s))z.call(s,e)&&x(n,e,s[e]);return n};import{_ as a,j as t}from"./main.2.9.0.js";import{b as g}from"./react-router.DMwpH23k.js";import{y as T,a9 as _}from"./Note.NSUdvR3c.js";import{T as P}from"./TutorialLink.CFG7bS5c.js";import{d as w}from"./InstasentCommonFunc.CY5oGi9Y.js";import"./react-vendor.P7K3d6op.js";import"./CopyIcn.CEA_lFLo.js";function K({instasentConf:n,setInstasentConf:s,step:e,setstep:j,loading:i,setLoading:k,setSnackbar:S,isInfo:r}){const[o,N]=g.useState(!1),[b,f]=g.useState({name:"",auth_token:""}),d="https://app.instasent.com/",y=()=>{setTimeout(()=>{document.getElementById("btcd-settings-wrp").scrollTop=0},300),j(2)},m=l=>{const h=c({},n),u=c({},b);u[l.target.name]="",h[l.target.name]=l.target.value,f(u),s(h)},A=`
    <h4>${a("Step of generate API token:","bit-integrations")}</h4>
    <ul>
      <li>${a("Goto","bit-integrations")} <a href=${d}>Instasent Dashboard</a></li>
      <li>${a("Copy the <b>API 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:e===1&&900,height:e===1&&"auto"},children:[t.jsx(P,{linkKey:"instasent"}),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:m,name:"name",value:n.name,type:"text",placeholder:a("Integration Name...","bit-integrations"),disabled:r}),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:m,name:"auth_token",value:n.auth_token,type:"text",placeholder:a("API Token...","bit-integrations"),disabled:r}),t.jsx("div",{style:{color:"red",fontSize:"15px"},children:b.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:d,target:"_blank",rel:"noreferrer",children:a("Instasent Dashboard","bit-integrations")})]}),t.jsx("br",{}),t.jsx("br",{}),!r&&t.jsxs("div",{children:[t.jsxs("button",{onClick:()=>w(n,N,i,k),className:"btn btcd-btn-lg purple sh-sm flx",type:"button",disabled:o||i.auth,children:[o?a("Authorized ✔","bit-integrations"):a("Authorize","bit-integrations"),i.auth&&t.jsx(T,{size:"20",clr:"#022217",className:"ml-2"})]}),t.jsx("br",{}),t.jsxs("button",{onClick:y,className:"btn ml-auto btcd-btn-lg purple sh-sm flx",type:"button",disabled:!o,children:[a("Next","bit-integrations"),t.jsx("div",{className:"btcd-icn icn-arrow_back rev-icn d-in-b"})]})]}),t.jsx(_,{note:A})]})}export{K as default};
