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