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