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