var w=Object.defineProperty;var x=Object.getOwnPropertySymbols;var z=Object.prototype.hasOwnProperty,f=Object.prototype.propertyIsEnumerable;var u=(s,t,a)=>t in s?w(s,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):s[t]=a,l=(s,t)=>{for(var a in t||(t={}))z.call(t,a)&&u(s,a,t[a]);if(x)for(var a of x(t))f.call(t,a)&&u(s,a,t[a]);return s};import{r as j,j as e,_ as r,C as T}from"./main-343.js";import{a6 as _}from"./bf-659-81.js";import{N as E}from"./bf-713-109.js";import{h as S}from"./bf-885-179.js";import"./bf-974-82.js";import"./bf-649-79.js";function O({sendFoxConf:s,setSendFoxConf:t,step:a,setstep:g,isLoading:b,setIsLoading:N,setSnackbar:k,redirectLocation:A,isInfo:n}){const[i,v]=j.useState(!1),[o,d]=j.useState({dataCenter:"",clientId:""}),y=()=>{setTimeout(()=>{document.getElementById("btcd-settings-wrp").scrollTop=0},300),g(2)},m=c=>{const h=l({},s),p=l({},o);p[c.target.name]="",h[c.target.name]=c.target.value,d(p),t(h)};return e.jsxs("div",{className:"btcd-stp-page",style:{width:a===1&&900,height:a===1&&"auto"},children:[e.jsx("div",{className:"mt-3",children:e.jsx("b",{children:r("Integration Name:")})}),e.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:m,name:"name",value:s.name,type:"text",placeholder:r("Integration Name..."),disabled:n}),e.jsxs("small",{className:"d-blk mt-3",children:[r("To Get Client Auth token, Please Visit")," ",e.jsx("a",{className:"btcd-link",href:"https://sendfox.com/account/oauth",target:"_blank",rel:"noreferrer",children:r("SendFox Access Token")})]}),e.jsx("div",{className:"mt-3",children:e.jsx("b",{children:r("Authorized Redirect URIs:")})}),e.jsx(T,{value:A||`${window.location.href}`,className:"field-key-cpy w-6 ml-0",readOnly:n,setSnackbar:k}),e.jsx("div",{className:"mt-3",children:e.jsx("b",{children:r("Access Token:")})}),e.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:m,name:"access_token",value:s.access_token,type:"text",placeholder:r("Access Token..."),disabled:n}),e.jsx("div",{style:{color:"red",fontSize:"15px"},children:o.access_token}),!n&&e.jsxs(e.Fragment,{children:[e.jsx(_,{isAuthorized:i,isLoading:b,handleAuthorize:()=>S(s,t,d,v,N)}),e.jsx("br",{}),e.jsx(E,{nextPageHandler:()=>y(),disabled:!i})]})]})}export{O as default};
