File: /var/www/html/wordpress/wp-content/plugins/bit-integrations/assets/bi.559.200.js
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-685.js";import{B as E}from"./bi.788.791.js";import{_ as n}from"./bi.878.0.js";import{a2 as B,z as C}from"./bi.451.455.js";import{c as S,a as _}from"./bi.647.818.js";import{T,t as P}from"./bi.703.796.js";import"./bi.327.9.js";function G({formID:a,trelloConf:e,setTrelloConf:i,step:p,setstep:f,isLoading:h,setIsLoading:u,setSnackbar:l,redirectLocation:v,isInfo:r}){const[o,z]=k.useState(!1),[c,b]=k.useState({dataCenter:"",clientId:""}),{trello:s}=P,A=()=>{setTimeout(()=>{document.getElementById("btcd-settings-wrp").scrollTop=0},300),f(2),_(a,e,i,u,l)},x=d=>{const g=m({},e),j=m({},c);j[d.target.name]="",g[d.target.name]=d.target.value,b(j),i(g)};return t.jsxs("div",{className:"btcd-stp-page",style:{width:p===1&&900,height:p===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:v||`${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,b,z,u,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{G as default};