var I=Object.defineProperty;var j=Object.getOwnPropertySymbols;var k=Object.prototype.hasOwnProperty,w=Object.prototype.propertyIsEnumerable;var N=(r,e,i)=>e in r?I(r,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):r[e]=i,d=(r,e)=>{for(var i in e||(e={}))k.call(e,i)&&N(r,i,e[i]);if(j)for(var i of j(e))w.call(e,i)&&N(r,i,e[i]);return r};import{j as t,_ as s}from"./main.2.9.0.js";import{b as y}from"./react-router.DMwpH23k.js";import{B as T}from"./BackIcn._8Wofmn2.js";import{a2 as E,y as B}from"./Note.NSUdvR3c.js";import{c as C,a as S}from"./TrelloCommonFunc.D9g9N5Od.js";import{T as _}from"./TutorialLink.CFG7bS5c.js";import"./react-vendor.P7K3d6op.js";import"./CopyIcn.CEA_lFLo.js";function q({formID:r,trelloConf:e,setTrelloConf:i,step:m,setstep:f,isLoading:p,setIsLoading:h,setSnackbar:n,redirectLocation:v,isInfo:a}){const[l,z]=y.useState(!1),[o,b]=y.useState({dataCenter:"",clientId:""}),A=()=>{setTimeout(()=>{document.getElementById("btcd-settings-wrp").scrollTop=0},300),f(2),S(r,e,i,h,n)},x=c=>{const u=d({},e),g=d({},o);g[c.target.name]="",u[c.target.name]=c.target.value,b(g),i(u)};return t.jsxs("div",{className:"btcd-stp-page",style:{width:m===1&&900,height:m===1&&"auto"},children:[t.jsx(_,{linkKey:"trello"}),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:a}),t.jsx("div",{className:"mt-3",children:t.jsx("b",{children:s("Authorized Redirect URIs:","bit-integrations")})}),t.jsx(E,{value:v||`${window.location.href}`,className:"field-key-cpy w-6 ml-0",readOnly:a,setSnackbar:n}),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:a}),t.jsx("div",{style:{color:"red",fontSize:"15px"},children:o.clientId}),t.jsx("div",{style:{color:"red",fontSize:"15px"},children:o.clientSecret}),!a&&t.jsxs(t.Fragment,{children:[t.jsxs("button",{onClick:()=>C("trello","trello",e,i,b,z,h,n),className:"btn btcd-btn-lg purple sh-sm flx",type:"button",disabled:l||p,children:[l?s("Authorized ✔","bit-integrations"):s("Authorize","bit-integrations"),p&&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:!l,children:[s("Next","bit-integrations"),t.jsx(T,{className:"ml-1 rev-icn"})]})]})]})}export{q as default};
