var j=Object.defineProperty;var d=Object.getOwnPropertySymbols;var A=Object.prototype.hasOwnProperty,N=Object.prototype.propertyIsEnumerable;var m=(i,s,n)=>s in i?j(i,s,{enumerable:!0,configurable:!0,writable:!0,value:n}):i[s]=n,p=(i,s)=>{for(var n in s||(s={}))A.call(s,n)&&m(i,n,s[n]);if(d)for(var n of d(s))N.call(s,n)&&m(i,n,s[n]);return i};import{j as t,_ as e}from"./main.2.9.0.js";import{b as f}from"./react-router.DMwpH23k.js";import{y as v,a9 as y}from"./Note.NSUdvR3c.js";import{T as I}from"./TutorialLink.CFG7bS5c.js";import{e as T}from"./SenderCommonFunc.DTpdnXOK.js";import"./react-vendor.P7K3d6op.js";import"./CopyIcn.CEA_lFLo.js";const h="https://app.sender.net/settings/tokens",P=`
    <h4>${e("Steps to generate an API access token:","bit-integrations")}</h4>
    <ul>
      <li>${e("Go to","bit-integrations")} <a href=${h} target="_blank" rel="noreferrer">${e("Sender API Access Tokens","bit-integrations")}</a></li>
      <li>${e("Create a token and copy it.","bit-integrations")}</li>
      <li>${e("Paste it into the <b>API Token</b> field and click <b>Authorize</b>.","bit-integrations")}</li>
    </ul>
  `;function B({senderConf:i,setSenderConf:s,step:n,setstep:u,loading:a,setLoading:g,isInfo:r}){const[o,x]=f.useState(!1),k=()=>{setTimeout(()=>{document.getElementById("btcd-settings-wrp").scrollTop=0},300),u(2)},l=c=>{const b=p({},i);b[c.target.name]=c.target.value,s(b)};return t.jsxs("div",{className:"btcd-stp-page",style:{width:n===1&&900,height:n===1&&"auto"},children:[t.jsx(I,{linkKey:"sender"}),t.jsx("div",{className:"mt-3",children:t.jsx("b",{children:e("Integration Name:","bit-integrations")})}),t.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:l,name:"name",value:i.name,type:"text",placeholder:e("Integration Name...","bit-integrations"),disabled:r}),t.jsx("div",{className:"mt-3",children:t.jsx("b",{children:e("API Token:","bit-integrations")})}),t.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:l,name:"api_token",value:i.api_token,type:"text",placeholder:e("API Token...","bit-integrations"),disabled:r}),t.jsxs("small",{className:"d-blk mt-3",children:[e("To get your API token, please visit","bit-integrations")," ",t.jsx("a",{className:"btcd-link",href:h,target:"_blank",rel:"noreferrer",children:e("Sender API Access Tokens","bit-integrations")})]}),t.jsx("br",{}),t.jsx("br",{}),!r&&t.jsxs("div",{children:[t.jsxs("button",{onClick:()=>T(i,x,a,g),className:"btn btcd-btn-lg purple sh-sm flx",type:"button",disabled:o||a.auth||!i.api_token,children:[o?e("Authorized ✔","bit-integrations"):e("Authorize","bit-integrations"),a.auth&&t.jsx(v,{size:"20",clr:"#022217",className:"ml-2"})]}),t.jsx("br",{}),t.jsxs("button",{onClick:k,className:"btn ml-auto btcd-btn-lg purple sh-sm flx",type:"button",disabled:!o,children:[e("Next","bit-integrations"),t.jsx("div",{className:"btcd-icn icn-arrow_back rev-icn d-in-b"})]})]}),t.jsx(y,{note:P})]})}export{B as default};
