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