var I=Object.defineProperty;var N=Object.getOwnPropertySymbols;var w=Object.prototype.hasOwnProperty,E=Object.prototype.propertyIsEnumerable;var y=(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)&&y(a,i,e[i]);if(N)for(var i of N(e))E.call(e,i)&&y(a,i,e[i]);return a};import{j as t,_ as s}from"./main.2.8.1.js";import{d as f}from"./react-router-dom.9mCuUg3q.js";import{B as L}from"./BackIcn._kGL_vVw.js";import{a2 as B,z as C}from"./Note.BeM7sN-p.js";import{c as S,a as _}from"./TrelloCommonFunc.B7Mpg8Qx.js";import{t as P}from"./tutorialLinks.kMkIDzcD.js";import{T as k}from"./TutorialLink.BAFX--T3.js";import"./CopyIcn.3gZpHton.js";function H({formID:a,trelloConf:e,setTrelloConf:i,step:p,setstep:v,isLoading:h,setIsLoading:b,setSnackbar:l,redirectLocation:z,isInfo:r}){const[o,T]=f.useState(!1),[c,u]=f.useState({dataCenter:"",clientId:""}),{trello:n}=P,A=()=>{setTimeout(()=>{document.getElementById("btcd-settings-wrp").scrollTop=0},300),v(2),_(a,e,i,b,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:p===1&&900,height:p===1&&"auto"},children:[t.jsx(k,{title:"Trello",youTubeLink:n==null?void 0:n.youTubeLink}),t.jsx(k,{title:"Trello",docLink:n==null?void 0:n.docLink}),t.jsx("div",{className:"mt-3",children:t.jsx("b",{children:s("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:s("Integration Name...","bit-integrations"),disabled:r}),t.jsx("div",{className:"mt-3",children:t.jsx("b",{children:s("Authorized Redirect URIs:","bit-integrations")})}),t.jsx(B,{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:[s("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:s("Trello API Console","bit-integrations")})]}),t.jsx("div",{className:"mt-3",children:t.jsx("b",{children:s("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:s("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,T,b,l),className:"btn btcd-btn-lg purple sh-sm flx",type:"button",disabled:o||h,children:[o?s("Authorized ✔","bit-integrations"):s("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:[s("Next","bit-integrations"),t.jsx(L,{className:"ml-1 rev-icn"})]})]})]})}export{H as default};
