var v=Object.defineProperty;var g=Object.getOwnPropertySymbols;var z=Object.prototype.hasOwnProperty,_=Object.prototype.propertyIsEnumerable;var j=(a,s,i)=>s in a?v(a,s,{enumerable:!0,configurable:!0,writable:!0,value:i}):a[s]=i,l=(a,s)=>{for(var i in s||(s={}))z.call(s,i)&&j(a,i,s[i]);if(g)for(var i of g(s))_.call(s,i)&&j(a,i,s[i]);return a};import{r as T,j as e}from"./main-406.js";import{_ as n,L as E,N as S}from"./bi.394.85.js";import{a as I}from"./bi.689.764.js";import{T as N,t as C}from"./bi.150.760.js";function R({formID:a,slackConf:s,setSlackConf:i,step:d,setstep:k,isLoading:m,setIsLoading:A,setSnackbar:f,redirectLocation:F,isInfo:r}){const[o,w]=T.useState(!1),[b,p]=T.useState({accessToken:""}),{slack:t}=C,y=()=>{setTimeout(()=>{document.getElementById("btcd-settings-wrp").scrollTop=0},300),k(2)},u=c=>{const h=l({},s),x=l({},b);x[c.target.name]="",h[c.target.name]=c.target.value,p(x),i(h)},L=`
            <h4>Get Access Token few step</h4>
            <ul>
                <li>First create app.</li>
                <li>Add an OAuth Scope <b>'channels:read, channels:write, chat:write, files:read, files:write'</b>.</li>
                <li>Generate Access Token clicking <b> 'install to Workspace'</b>.</li>
            </ul>`;return e.jsxs("div",{className:"btcd-stp-page",style:{width:d===1&&900,height:d===1&&"auto"},children:[(t==null?void 0:t.youTubeLink)&&e.jsx(N,{title:t==null?void 0:t.title,youTubeLink:t==null?void 0:t.youTubeLink}),(t==null?void 0:t.docLink)&&e.jsx(N,{title:t==null?void 0:t.title,docLink:t==null?void 0:t.docLink}),e.jsx("div",{className:"mt-3",children:e.jsx("b",{children:n("Integration Name:","bit-integrations")})}),e.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:u,name:"name",value:s.name,type:"text",placeholder:n("Integration Name...","bit-integrations"),disabled:r}),e.jsxs("small",{className:"d-blk mt-5",children:[n("To get access Token , Please Visit","bit-integrations")," ",e.jsx("a",{className:"btcd-link",href:"https://api.slack.com/apps?new_app=1/",target:"_blank",rel:"noreferrer",children:n("Slack Console","bit-integrations")})]}),e.jsx("div",{className:"mt-3",children:e.jsx("b",{children:n("Access Token:","bit-integrations")})}),e.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:u,name:"accessToken",value:s.accessToken,type:"text",placeholder:n("Access Token...","bit-integrations"),disabled:r}),e.jsx("div",{style:{color:"red"},children:b.accessToken}),!r&&e.jsxs(e.Fragment,{children:[e.jsxs("button",{onClick:()=>I(s,i,p,w,A,f),className:"btn btcd-btn-lg purple sh-sm flx",type:"button",disabled:o||m,children:[o?n("Authorized ✔","bit-integrations"):n("Authorize","bit-integrations"),m&&e.jsx(E,{size:"20",clr:"#022217",className:"ml-2"})]}),e.jsx("br",{}),e.jsxs("button",{onClick:y,className:"btn f-right btcd-btn-lg purple sh-sm flx",type:"button",disabled:!o,children:[n("Next","bit-integrations"),e.jsx("div",{className:"btcd-icn icn-arrow_back rev-icn d-in-b"})]})]}),e.jsx(S,{note:L})]})}export{R as default};
