var T=Object.defineProperty;var x=Object.getOwnPropertySymbols;var _=Object.prototype.hasOwnProperty,z=Object.prototype.propertyIsEnumerable;var g=(e,i,s)=>i in e?T(e,i,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[i]=s,m=(e,i)=>{for(var s in i||(i={}))_.call(i,s)&&g(e,s,i[s]);if(x)for(var s of x(i))z.call(i,s)&&g(e,s,i[s]);return e};import{j as t,_ as r}from"./main.2.8.1.js";import{d as j}from"./react-router-dom.9mCuUg3q.js";import{z as I}from"./Note.BeM7sN-p.js";import{e as L}from"./AsanaCommonFunc.CL0P85Ce.js";import{t as w}from"./tutorialLinks.kMkIDzcD.js";import{T as k}from"./TutorialLink.BAFX--T3.js";import"./CopyIcn.3gZpHton.js";function V({asanaConf:e,setAsanaConf:i,step:s,setStep:y,loading:a,setLoading:N,isInfo:o}){const[l,A]=j.useState(!1),[d,p]=j.useState({api_key:""}),{asana:n}=w,v=()=>{setTimeout(()=>{document.getElementById("btcd-settings-wrp").scrollTop=0},300),e!=null&&e.default,y(2)},b=c=>{const u=m({},e),h=m({},d);h[c.target.name]="",u[c.target.name]=c.target.value,p(h),i(u)};return t.jsxs("div",{className:"btcd-stp-page",style:{width:s===1&&900,height:s===1&&"auto"},children:[t.jsx(k,{title:"Asana",youTubeLink:n==null?void 0:n.youTubeLink}),t.jsx(k,{title:"Asana",docLink:n==null?void 0:n.docLink}),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:b,name:"name",value:e.name,type:"text",placeholder:r("Integration Name...","bit-integrations"),disabled:o}),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:b,name:"api_key",value:e.api_key,type:"text",placeholder:r("API Token...","bit-integrations"),disabled:o}),t.jsx("div",{style:{color:"red",fontSize:"15px"},children:d.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",{}),!o&&t.jsxs("div",{children:[t.jsxs("button",{onClick:()=>L(e,i,p,A,a,N),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(I,{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:!l,children:[r("Next","bit-integrations"),t.jsx("div",{className:"btcd-icn icn-arrow_back rev-icn d-in-b"})]})]})]})}export{V as default};
