var z=Object.defineProperty;var x=Object.getOwnPropertySymbols;var T=Object.prototype.hasOwnProperty,w=Object.prototype.propertyIsEnumerable;var g=(i,e,s)=>e in i?z(i,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):i[e]=s,l=(i,e)=>{for(var s in e||(e={}))T.call(e,s)&&g(i,s,e[s]);if(x)for(var s of x(e))w.call(e,s)&&g(i,s,e[s]);return i};import{j as t,_ as a}from"./main.2.9.0.js";import{b as j}from"./react-router.DMwpH23k.js";import{B as _}from"./BackIcn._8Wofmn2.js";import{a2 as E,y as I}from"./Note.NSUdvR3c.js";import{T as S}from"./TutorialLink.CFG7bS5c.js";import{e as C}from"./SendFoxCommonFunc.BXWHC2Im.js";import"./react-vendor.P7K3d6op.js";import"./CopyIcn.CEA_lFLo.js";import"./Integrations.DL8wqGct.js";import"./SnackMsg.DYSD96P4.js";import"./Table.BfF8RYFZ.js";import"./index.DpWdl9V1.js";import"./TagifyInput.KPPRQJ1B.js";import"./lodash.DCvQBX3r.js";function M({formID:i,sendFoxConf:e,setSendFoxConf:s,step:c,setstep:k,isLoading:m,setIsLoading:N,setSnackbar:f,redirectLocation:y,isInfo:r}){const[n,A]=j.useState(!1),[d,p]=j.useState({dataCenter:"",clientId:""}),v=()=>{setTimeout(()=>{document.getElementById("btcd-settings-wrp").scrollTop=0},300),k(2)},h=o=>{const b=l({},e),u=l({},d);u[o.target.name]="",b[o.target.name]=o.target.value,p(u),s(b)};return t.jsxs("div",{className:"btcd-stp-page",style:{width:c===1&&900,height:c===1&&"auto"},children:[t.jsx(S,{linkKey:"sendFox"}),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:h,name:"name",value:e.name,type:"text",placeholder:a("Integration Name...","bit-integrations"),disabled:r}),t.jsx("div",{className:"mt-3",children:t.jsx("b",{children:a("Authorized Redirect URIs:","bit-integrations")})}),t.jsx(E,{value:y||`${window.location.href}`,className:"field-key-cpy w-6 ml-0",readOnly:r,setSnackbar:f}),t.jsx("div",{className:"mt-3",children:t.jsx("b",{children:a("Access Token:","bit-integrations")})}),t.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:h,name:"access_token",value:e.access_token,type:"text",placeholder:a("Access Token...","bit-integrations"),disabled:r}),t.jsx("div",{style:{color:"red",fontSize:"15px"},children:d.access_token}),t.jsxs("small",{className:"d-blk mt-3",children:[a("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:a("SendFox Access Token","bit-integrations")})]}),!r&&t.jsxs(t.Fragment,{children:[t.jsxs("button",{onClick:()=>C(e,s,p,A,N),className:"btn btcd-btn-lg purple sh-sm flx",type:"button",disabled:n||m,children:[n?a("Authorized ✔","bit-integrations"):a("Authorize","bit-integrations"),m&&t.jsx(I,{size:20,clr:"#022217",className:"ml-2"})]}),t.jsx("br",{}),t.jsxs("button",{onClick:v,className:"btn f-right btcd-btn-lg purple sh-sm flx",type:"button",disabled:!n,children:[a("Next","bit-integrations"),t.jsx(_,{className:"ml-1 rev-icn"})]})]})]})}export{M as default};
