var _=Object.defineProperty;var x=Object.getOwnPropertySymbols;var w=Object.prototype.hasOwnProperty,z=Object.prototype.propertyIsEnumerable;var k=(t,n,s)=>n in t?_(t,n,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[n]=s,b=(t,n)=>{for(var s in n||(n={}))w.call(n,s)&&k(t,s,n[s]);if(x)for(var s of x(n))z.call(n,s)&&k(t,s,n[s]);return t};import{r as g,j as i}from"./main-406.js";import{_ as o,L as A,N as E,W as I}from"./bi.394.85.js";import{s as P}from"./bi.945.899.js";import{T as j,t as G}from"./bi.150.760.js";function F({salesmateConf:t,setSalesmateConf:n,step:s,setStep:N,loading:a,setLoading:v,isInfo:r}){const[c,T]=g.useState(!1),[l,p]=g.useState({session_token:""}),{salesmate:e}=G,y=()=>{setTimeout(()=>{document.getElementById("btcd-settings-wrp").scrollTop=0},300),t!=null&&t.default,N(2)},d=u=>{const h=b({},t),m=b({},l);m[u.target.name]="",h[u.target.name]=u.target.value,p(m),n(h)},S=()=>{t.link_name?window.open(`https://${t.link_name}.salesmate.io/#/app/user/accesskey`,"_blank","noreferrer"):I.error(o("Link Name is required!","bit-integrations"))},L=`
            <h4>Get Session Token</h4>
            <ul>
                <li>First go to your Salesmate dashboard.</li>
                <li>Click go to your "Profile" from Right top corner</li>
                <li>Then Click "Access Key"</li>
                <li>Then click "Session Key / Session Token", Then Copied</li>
            </ul>`;return i.jsxs("div",{className:"btcd-stp-page",style:{width:s===1&&900,height:s===1&&"auto"},children:[(e==null?void 0:e.youTubeLink)&&i.jsx(j,{title:e==null?void 0:e.title,youTubeLink:e==null?void 0:e.youTubeLink}),(e==null?void 0:e.docLink)&&i.jsx(j,{title:e==null?void 0:e.title,docLink:e==null?void 0:e.docLink}),i.jsx("div",{className:"mt-3",children:i.jsx("b",{children:o("Integration Name:","bit-integrations")})}),i.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:d,name:"name",value:t.name,type:"text",placeholder:o("Integration Name...","bit-integrations"),disabled:r}),i.jsx("div",{className:"mt-3",children:i.jsx("b",{children:o("Session Token:","bit-integrations")})}),i.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:d,name:"session_token",value:t.session_token,type:"text",placeholder:o("Session Token...","bit-integrations"),disabled:r}),i.jsx("div",{style:{color:"red",fontSize:"15px"},children:l.session_token}),i.jsx("div",{className:"mt-3",children:i.jsx("b",{children:o("Link Name:","bit-integrations")})}),i.jsxs("div",{className:"btcd-input-group w-6 mt-1",children:[i.jsx("div",{className:"btcd-input-group-icon",children:"https://"}),i.jsx("div",{className:"btcd-input-group-area",children:i.jsx("input",{className:"btcd-paper-inp",onChange:d,name:"link_name",value:t.link_name,type:"text",placeholder:o("Link Name...","bit-integrations"),disabled:r})}),i.jsx("div",{className:"btcd-input-group-icon",children:".salesmate.io"})]}),i.jsx("div",{style:{color:"red",fontSize:"15px"},children:l.link_name}),i.jsxs("small",{className:"d-blk mt-3",children:[o("To Get Session Token, Please Visit","bit-integrations")," ",i.jsx("a",{className:"btcd-link",onClick:S,children:o("Salesmate Session Token","bit-integrations")})]}),i.jsx("br",{}),i.jsx("br",{}),!r&&i.jsxs("div",{children:[i.jsxs("button",{onClick:()=>P(t,n,p,T,a,v),className:"btn btcd-btn-lg purple sh-sm flx",type:"button",disabled:c||a.auth,children:[c?o("Authorized ✔","bit-integrations"):o("Authorize","bit-integrations"),a.auth&&i.jsx(A,{size:"20",clr:"#022217",className:"ml-2"})]}),i.jsx("br",{}),i.jsxs("button",{onClick:y,className:"btn ml-auto btcd-btn-lg purple sh-sm flx",type:"button",disabled:!c,children:[o("Next","bit-integrations"),i.jsx("div",{className:"btcd-icn icn-arrow_back rev-icn d-in-b"})]})]}),i.jsx(E,{note:L})]})}export{F as default};
