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