var v=Object.defineProperty;var u=Object.getOwnPropertySymbols;var I=Object.prototype.hasOwnProperty,P=Object.prototype.propertyIsEnumerable;var g=(e,s,a)=>s in e?v(e,s,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[s]=a,c=(e,s)=>{for(var a in s||(s={}))I.call(s,a)&&g(e,a,s[a]);if(u)for(var a of u(s))P.call(s,a)&&g(e,a,s[a]);return e};import{_ as i,j as t}from"./main.2.9.0.js";import{b as x}from"./react-router.DMwpH23k.js";import{y as T,a9 as _}from"./Note.NSUdvR3c.js";import{i as z}from"./ClickupCommonFunc.Cx2auaOU.js";import{T as f}from"./TutorialLink.CFG7bS5c.js";import"./react-vendor.P7K3d6op.js";import"./CopyIcn.CEA_lFLo.js";function B({clickupConf:e,setClickupConf:s,step:a,setStep:y,loading:n,setLoading:j,isInfo:r}){const[o,k]=x.useState(!1),[d,m]=x.useState({api_key:""}),A=()=>{setTimeout(()=>{document.getElementById("btcd-settings-wrp").scrollTop=0},300),e!=null&&e.default,y(2)},b=l=>{const p=c({},e),h=c({},d);h[l.target.name]="",p[l.target.name]=l.target.value,m(h),s(p)},N=`
            <h4>${i("To get the ClickUp API Key","bit-integrations")}</h4>
            <ul>
                <li>${i("Navigate to your personal Settings.","bit-integrations")}</li>
                <li>${i("Click Apps in the left sidebar.","bit-integrations")}</li>
                <li>${i("Click Generate to create your API token.","bit-integrations")}</li>
                <li>${i("Click Copy to copy the key to your clipboard.","bit-integrations")}</li>
                <li>${i("Paste your API Key into the “API Key” field.","bit-integrations")}</li>
            </ul>`;return t.jsxs("div",{className:"btcd-stp-page",style:{width:a===1&&900,height:a===1&&"auto"},children:[t.jsx(f,{linkKey:"clickup"}),t.jsx("div",{className:"mt-3",children:t.jsx("b",{children:i("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:i("Integration Name...","bit-integrations"),disabled:r}),t.jsx("div",{className:"mt-3",children:t.jsx("b",{children:i("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:i("API Token...","bit-integrations"),disabled:r}),t.jsx("div",{style:{color:"red",fontSize:"15px"},children:d.api_key}),t.jsxs("small",{className:"d-blk mt-3",children:[i("To Get API Token, Please Visit","bit-integrations")," ",t.jsx("a",{className:"btcd-link",href:"https://app.clickup.com/0/my-apps",target:"_blank",rel:"noreferrer",children:i("Clickup API Token","bit-integrations")})]}),t.jsx("br",{}),t.jsx("br",{}),!r&&t.jsxs("div",{children:[t.jsxs("button",{onClick:()=>z(e,s,m,k,n,j),className:"btn btcd-btn-lg purple sh-sm flx",type:"button",disabled:o||n.auth,children:[o?i("Authorized ✔","bit-integrations"):i("Authorize","bit-integrations"),n.auth&&t.jsx(T,{size:"20",clr:"#022217",className:"ml-2"})]}),t.jsx("br",{}),t.jsxs("button",{onClick:A,className:"btn ml-auto btcd-btn-lg purple sh-sm flx",type:"button",disabled:!o,children:[i("Next","bit-integrations"),t.jsx("div",{className:"btcd-icn icn-arrow_back rev-icn d-in-b"})]})]}),t.jsx(_,{note:N})]})}export{B as default};
