var w=Object.defineProperty;var g=Object.getOwnPropertySymbols;var S=Object.prototype.hasOwnProperty,_=Object.prototype.propertyIsEnumerable;var j=(a,e,s)=>e in a?w(a,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):a[e]=s,c=(a,e)=>{for(var s in e||(e={}))S.call(e,s)&&j(a,s,e[s]);if(g)for(var s of g(e))_.call(e,s)&&j(a,s,e[s]);return a};import{j as t,_ as i}from"./main.2.8.1.js";import{d as k}from"./react-router-dom.9mCuUg3q.js";import{B as L}from"./BackIcn._kGL_vVw.js";import{a2 as E,z as I}from"./Note.BeM7sN-p.js";import{c as C}from"./SendFoxCommonFunc.DYCIjzPK.js";import{t as B}from"./tutorialLinks.kMkIDzcD.js";import{T as N}from"./TutorialLink.BAFX--T3.js";import"./CopyIcn.3gZpHton.js";import"./Integrations.D2bgBas2.js";import"./SnackMsg.S8DrwLlT.js";import"./Table.DAL7rcPQ.js";import"./index.wO-AxluA.js";import"./TagifyInput.Cu0YIRbG.js";import"./tagify.YxUZd8Ix.js";function X({formID:a,sendFoxConf:e,setSendFoxConf:s,step:m,setstep:f,isLoading:d,setIsLoading:y,setSnackbar:A,redirectLocation:T,isInfo:n}){const[o,v]=k.useState(!1),[p,u]=k.useState({dataCenter:"",clientId:""}),{sendFox:r}=B,z=()=>{setTimeout(()=>{document.getElementById("btcd-settings-wrp").scrollTop=0},300),f(2)},b=l=>{const h=c({},e),x=c({},p);x[l.target.name]="",h[l.target.name]=l.target.value,u(x),s(h)};return t.jsxs("div",{className:"btcd-stp-page",style:{width:m===1&&900,height:m===1&&"auto"},children:[t.jsx(N,{title:"SendFox",youTubeLink:r==null?void 0:r.youTubeLink}),t.jsx(N,{title:"SendFox",docLink:r==null?void 0:r.docLink}),t.jsx("div",{className:"mt-3",children:t.jsx("b",{children:i("Integration Name:","bit-integrations")})}),t.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:b,name:"name",value:e.name,type:"text",placeholder:i("Integration Name...","bit-integrations"),disabled:n}),t.jsx("div",{className:"mt-3",children:t.jsx("b",{children:i("Authorized Redirect URIs:","bit-integrations")})}),t.jsx(E,{value:T||`${window.location.href}`,className:"field-key-cpy w-6 ml-0",readOnly:n,setSnackbar:A}),t.jsx("div",{className:"mt-3",children:t.jsx("b",{children:i("Access Token:","bit-integrations")})}),t.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:b,name:"access_token",value:e.access_token,type:"text",placeholder:i("Access Token...","bit-integrations"),disabled:n}),t.jsx("div",{style:{color:"red",fontSize:"15px"},children:p.access_token}),t.jsxs("small",{className:"d-blk mt-3",children:[i("To Get Client Auth token, Please Visit","bit-integrations")," ",t.jsx("a",{className:"btcd-link",href:"https://sendfox.com/account/oauth",target:"_blank",rel:"noreferrer",children:i("SendFox Access Token","bit-integrations")})]}),!n&&t.jsxs(t.Fragment,{children:[t.jsxs("button",{onClick:()=>C(e,s,u,v,y),className:"btn btcd-btn-lg purple sh-sm flx",type:"button",disabled:o||d,children:[o?i("Authorized ✔","bit-integrations"):i("Authorize","bit-integrations"),d&&t.jsx(I,{size:20,clr:"#022217",className:"ml-2"})]}),t.jsx("br",{}),t.jsxs("button",{onClick:z,className:"btn f-right btcd-btn-lg purple sh-sm flx",type:"button",disabled:!o,children:[i("Next","bit-integrations"),t.jsx(L,{className:"ml-1 rev-icn"})]})]})]})}export{X as default};
