import{_ as e,j as t}from"./main.2.8.1.js";import{d as u}from"./react-router-dom.9mCuUg3q.js";import{z as v,a9 as A,u as x}from"./Note.BeM7sN-p.js";import{s as w}from"./SmartSuiteCommonFunc.CvtSYFSX.js";import{t as P}from"./tutorialLinks.kMkIDzcD.js";import{T as z}from"./TutorialLink.BAFX--T3.js";import"./CopyIcn.3gZpHton.js";function R({smartSuiteConf:i,setSmartSuiteConf:d,step:p,setStep:g,loading:n,setLoading:k,isInfo:a}){const[o,j]=u.useState(!1),{smartSuite:s}=P,[b,m]=u.useState({workspaceId:"",apiToken:""}),I=()=>{setTimeout(()=>{document.getElementById("btcd-settings-wrp").scrollTop=0},300),i!=null&&i.default,g(2)},r=N=>{const{name:h,value:y}=N.target;m(l=>x(l,c=>{c[h]=""})),d(l=>x(l,c=>{c[h]=y}))},T=`
            <h4>${e("To Get Workspace ID & API Token","bit-integrations")}</h4>
            <ul>
                <li>${e("First go to your SmartSuite dashboard.","bit-integrations")}</li>
                <li>${e("Click go to Profile Icon from Right Top corner.","bit-integrations")}</li>
                <li>${e('Then Click "API Key" from the "My Profile Menu".',"bit-integrations")}</li>
                <li>${e('Then Click and Copy the "Hidden Api Token".',"bit-integrations")}</li>
                <li>${e("Your Workspace Id is the 8 characters that follow https://app.smartsuite.com/ in the SmartSuite URL when you’re logged in.","bit-integrations")}</li>

            </ul>`;return t.jsxs("div",{className:"btcd-stp-page",style:{width:p===1&&900,height:p===1&&"auto"},children:[s==null?void 0:s.youTubeLink,t.jsx(z,{title:"SmartSuite",docLink:s==null?void 0:s.docLink}),t.jsx("div",{className:"mt-3",children:t.jsx("b",{children:e("Integration Name:","bit-integrations")})}),t.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:r,name:"name",value:i.name,type:"text",placeholder:e("Integration Name...","bit-integrations"),disabled:a}),t.jsx("div",{className:"mt-3",children:t.jsx("b",{children:e("Workspace ID:","bit-integrations")})}),t.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:r,name:"workspaceId",value:i.workspaceId,type:"text",placeholder:e("Workspace ID...","bit-integrations"),disabled:a}),t.jsx("div",{style:{color:"red",fontSize:"15px"},children:b.workspaceId}),t.jsx("div",{className:"mt-3",children:t.jsx("b",{children:e("API Token:","bit-integrations")})}),t.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:r,name:"apiToken",value:i.apiToken,type:"text",placeholder:e("API Token...","bit-integrations"),disabled:a}),t.jsx("div",{style:{color:"red",fontSize:"15px"},children:b.apiToken}),t.jsxs("small",{className:"d-blk mt-3",children:[e("To Get API Token & Workspace ID, Please Visit","bit-integrations")," ",t.jsx("a",{className:"btcd-link",href:"https://app.smartsuite.com/",target:"_blank",children:e("SmartSuite API Token & Workspace ID","bit-integrations")})]}),t.jsx("br",{}),t.jsx("br",{}),!a&&t.jsxs("div",{children:[t.jsxs("button",{onClick:()=>w(i,d,m,j,n,k),className:"btn btcd-btn-lg purple sh-sm flx",type:"button",disabled:o||n.auth,children:[o?e("Authorized ✔","bit-integrations"):e("Authorize","bit-integrations"),n.auth&&t.jsx(v,{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:!o,children:[e("Next","bit-integrations"),t.jsx("div",{className:"btcd-icn icn-arrow_back rev-icn d-in-b"})]})]}),t.jsx(A,{note:T})]})}export{R as default};
