var L=Object.defineProperty;var x=Object.getOwnPropertySymbols;var T=Object.prototype.hasOwnProperty,_=Object.prototype.propertyIsEnumerable;var g=(i,s,r)=>s in i?L(i,s,{enumerable:!0,configurable:!0,writable:!0,value:r}):i[s]=r,a=(i,s)=>{for(var r in s||(s={}))T.call(s,r)&&g(i,r,s[r]);if(x)for(var r of x(s))_.call(s,r)&&g(i,r,s[r]);return i};import{r as j,j as t}from"./main-406.js";import{_ as n,L as z}from"./bi.394.85.js";import{e as I}from"./bi.266.878.js";import{T as k,t as w}from"./bi.150.760.js";function G({asanaConf:i,setAsanaConf:s,step:r,setStep:y,loading:l,setLoading:N,isInfo:o}){const[c,A]=j.useState(!1),[m,b]=j.useState({api_key:""}),{asana:e}=w,v=()=>{setTimeout(()=>{document.getElementById("btcd-settings-wrp").scrollTop=0},300),i!=null&&i.default,y(2)},p=d=>{const u=a({},i),h=a({},m);h[d.target.name]="",u[d.target.name]=d.target.value,b(h),s(u)};return t.jsxs("div",{className:"btcd-stp-page",style:{width:r===1&&900,height:r===1&&"auto"},children:[(e==null?void 0:e.youTubeLink)&&t.jsx(k,{title:e==null?void 0:e.title,youTubeLink:e==null?void 0:e.youTubeLink}),(e==null?void 0:e.docLink)&&t.jsx(k,{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:p,name:"name",value:i.name,type:"text",placeholder:n("Integration Name...","bit-integrations"),disabled:o}),t.jsx("div",{className:"mt-3",children:t.jsx("b",{children:n("API Key:","bit-integrations")})}),t.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:p,name:"api_key",value:i.api_key,type:"text",placeholder:n("API Token...","bit-integrations"),disabled:o}),t.jsx("div",{style:{color:"red",fontSize:"15px"},children:m.api_key}),t.jsxs("small",{className:"d-blk mt-3",children:[n("To Get API token, Please Visit","bit-integrations")," ",t.jsx("a",{className:"btcd-link",href:"https://app.asana.com/0/my-apps",target:"_blank",rel:"noreferrer",children:n("Asana API Token","bit-integrations")})]}),t.jsx("br",{}),t.jsx("br",{}),!o&&t.jsxs("div",{children:[t.jsxs("button",{onClick:()=>I(i,s,b,A,l,N),className:"btn btcd-btn-lg purple sh-sm flx",type:"button",disabled:c||l.auth,children:[c?n("Authorized ✔","bit-integrations"):n("Authorize","bit-integrations"),l.auth&&t.jsx(z,{size:"20",clr:"#022217",className:"ml-2"})]}),t.jsx("br",{}),t.jsxs("button",{onClick:v,className:"btn ml-auto btcd-btn-lg purple sh-sm flx",type:"button",disabled:!c,children:[n("Next","bit-integrations"),t.jsx("div",{className:"btcd-icn icn-arrow_back rev-icn d-in-b"})]})]})]})}export{G as default};
