var S=Object.defineProperty;var h=Object.getOwnPropertySymbols;var _=Object.prototype.hasOwnProperty,A=Object.prototype.propertyIsEnumerable;var x=(i,s,r)=>s in i?S(i,s,{enumerable:!0,configurable:!0,writable:!0,value:r}):i[s]=r,b=(i,s)=>{for(var r in s||(s={}))_.call(s,r)&&x(i,r,s[r]);if(h)for(var r of h(s))A.call(s,r)&&x(i,r,s[r]);return i};import{_ as e,j as t}from"./main.2.8.10.js";import{b as g}from"./react-router.DMwpH23k.js";import{y as I,a9 as z}from"./Note.DalStCGz.js";import{s as P}from"./SuiteDashCommonFunc.rSOiNiz1.js";import{T}from"./TutorialLink.D6K_DiHL.js";import"./react-vendor.P7K3d6op.js";import"./CopyIcn.BnhKHfEP.js";function B({suiteDashConf:i,setSuiteDashConf:s,step:r,setStep:j,loading:a,setLoading:y,isInfo:n}){const[l,N]=g.useState(!1),[o,m]=g.useState({session_token:""}),k=()=>{setTimeout(()=>{document.getElementById("btcd-settings-wrp").scrollTop=0},300),i!=null&&i.default,j(2)},c=d=>{const p=b({},i),u=b({},o);u[d.target.name]="",p[d.target.name]=d.target.value,m(u),s(p)},v=`
            <h4>${e("To Get Public Id & Secret Key","bit-integrations")}</h4>
            <ul>
                <li>${e("First go to your SuiteDash dashboard.","bit-integrations")}</li>
                <li>${e('Click go to your "Profile" from Right top corner',"bit-integrations")}</li>
                <li>${e('Then Click "Integrations"',"bit-integrations")}</li>
                <li>${e('Then Click "Secure Api"',"bit-integrations")}</li>
                <li>${e('Then copy "API Authorization Credentials"',"bit-integrations")}</li>
            </ul>`;return t.jsxs("div",{className:"btcd-stp-page",style:{width:r===1&&900,height:r===1&&"auto"},children:[t.jsx(T,{linkKey:"suiteDash"}),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:c,name:"name",value:i.name,type:"text",placeholder:e("Integration Name...","bit-integrations"),disabled:n}),t.jsx("div",{className:"mt-3",children:t.jsx("b",{children:e("Public Id:","bit-integrations")})}),t.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:c,name:"public_id",value:i.public_id,type:"text",placeholder:e("Public Id...","bit-integrations"),disabled:n}),t.jsx("div",{style:{color:"red",fontSize:"15px"},children:o.public_id}),t.jsx("div",{className:"mt-3",children:t.jsx("b",{children:e("Secret Key:","bit-integrations")})}),t.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:c,name:"secret_key",value:i.secret_key,type:"text",placeholder:e("Secret Key...","bit-integrations"),disabled:n}),t.jsx("div",{style:{color:"red",fontSize:"15px"},children:o.secret_key}),t.jsxs("small",{className:"d-blk mt-3",children:[e("To Get Public Id & Secret Key, Please Visit","bit-integrations")," ",t.jsx("a",{className:"btcd-link",href:"https://app.suitedash.com/integrations/publicApi?t=authentication",target:"_blank",children:e("SuiteDash Public Id & Secret Key","bit-integrations")})]}),t.jsx("br",{}),t.jsx("br",{}),!n&&t.jsxs("div",{children:[t.jsxs("button",{onClick:()=>P(i,s,m,N,a,y),className:"btn btcd-btn-lg purple sh-sm flx",type:"button",disabled:l||a.auth,children:[l?e("Authorized ✔","bit-integrations"):e("Authorize","bit-integrations"),a.auth&&t.jsx(I,{size:"20",clr:"#022217",className:"ml-2"})]}),t.jsx("br",{}),t.jsxs("button",{onClick:k,className:"btn ml-auto btcd-btn-lg purple sh-sm flx",type:"button",disabled:!l,children:[e("Next","bit-integrations"),t.jsx("div",{className:"btcd-icn icn-arrow_back rev-icn d-in-b"})]})]}),t.jsx(z,{note:v})]})}export{B as default};
