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