var L=Object.defineProperty;var j=Object.getOwnPropertySymbols;var w=Object.prototype.hasOwnProperty,_=Object.prototype.propertyIsEnumerable;var k=(r,s,i)=>s in r?L(r,s,{enumerable:!0,configurable:!0,writable:!0,value:i}):r[s]=i,o=(r,s)=>{for(var i in s||(s={}))w.call(s,i)&&k(r,i,s[i]);if(j)for(var i of j(s))_.call(s,i)&&k(r,i,s[i]);return r};import{r as x,j as t}from"./main-406.js";import{B as E}from"./bi.46.744.js";import{_ as a,X as I,L as S}from"./bi.394.85.js";import{c as C}from"./bi.614.794.js";import{T as N,t as B}from"./bi.150.760.js";function V({formID:r,sendFoxConf:s,setSendFoxConf:i,step:m,setstep:y,isLoading:d,setIsLoading:f,setSnackbar:T,redirectLocation:A,isInfo:n}){const[l,v]=x.useState(!1),[u,b]=x.useState({dataCenter:"",clientId:""}),{sendFox:e}=B,z=()=>{setTimeout(()=>{document.getElementById("btcd-settings-wrp").scrollTop=0},300),y(2)},h=c=>{const p=o({},s),g=o({},u);g[c.target.name]="",p[c.target.name]=c.target.value,b(g),i(p)};return t.jsxs("div",{className:"btcd-stp-page",style:{width:m===1&&900,height:m===1&&"auto"},children:[(e==null?void 0:e.youTubeLink)&&t.jsx(N,{title:e==null?void 0:e.title,youTubeLink:e==null?void 0:e.youTubeLink}),(e==null?void 0:e.docLink)&&t.jsx(N,{title:e==null?void 0:e.title,docLink:e==null?void 0:e.docLink}),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:s.name,type:"text",placeholder:a("Integration Name...","bit-integrations"),disabled:n}),t.jsx("div",{className:"mt-3",children:t.jsx("b",{children:a("Authorized Redirect URIs:","bit-integrations")})}),t.jsx(I,{value:A||`${window.location.href}`,className:"field-key-cpy w-6 ml-0",readOnly:n,setSnackbar:T}),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:s.access_token,type:"text",placeholder:a("Access Token...","bit-integrations"),disabled:n}),t.jsx("div",{style:{color:"red",fontSize:"15px"},children:u.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")})]}),!n&&t.jsxs(t.Fragment,{children:[t.jsxs("button",{onClick:()=>C(s,i,b,v,f),className:"btn btcd-btn-lg purple sh-sm flx",type:"button",disabled:l||d,children:[l?a("Authorized ✔","bit-integrations"):a("Authorize","bit-integrations"),d&&t.jsx(S,{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:!l,children:[a("Next","bit-integrations"),t.jsx(E,{className:"ml-1 rev-icn"})]})]})]})}export{V as default};
