import{_ as e,j as t}from"./main.2.8.10.js";import{b as h}from"./react-router.DMwpH23k.js";import{y,a9 as v,u}from"./Note.DalStCGz.js";import{s as A}from"./SmartSuiteCommonFunc.CMVBYUVW.js";import{T as w}from"./TutorialLink.D6K_DiHL.js";import"./react-vendor.P7K3d6op.js";import"./CopyIcn.BnhKHfEP.js";function _({smartSuiteConf:i,setSmartSuiteConf:c,step:d,setStep:x,loading:a,setLoading:g,isInfo:s}){const[n,k]=h.useState(!1),[p,m]=h.useState({workspaceId:"",apiToken:""}),j=()=>{setTimeout(()=>{document.getElementById("btcd-settings-wrp").scrollTop=0},300),i!=null&&i.default,x(2)},r=T=>{const{name:b,value:N}=T.target;m(o=>u(o,l=>{l[b]=""})),c(o=>u(o,l=>{l[b]=N}))},I=`
            <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:d===1&&900,height:d===1&&"auto"},children:[t.jsx(w,{linkKey:"smartSuite"}),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:s}),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:s}),t.jsx("div",{style:{color:"red",fontSize:"15px"},children:p.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:s}),t.jsx("div",{style:{color:"red",fontSize:"15px"},children:p.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",{}),!s&&t.jsxs("div",{children:[t.jsxs("button",{onClick:()=>A(i,c,m,k,a,g),className:"btn btcd-btn-lg purple sh-sm flx",type:"button",disabled:n||a.auth,children:[n?e("Authorized ✔","bit-integrations"):e("Authorize","bit-integrations"),a.auth&&t.jsx(y,{size:"20",clr:"#022217",className:"ml-2"})]}),t.jsx("br",{}),t.jsxs("button",{onClick:j,className:"btn ml-auto btcd-btn-lg purple sh-sm flx",type:"button",disabled:!n,children:[e("Next","bit-integrations"),t.jsx("div",{className:"btcd-icn icn-arrow_back rev-icn d-in-b"})]})]}),t.jsx(v,{note:I})]})}export{_ as default};
