var L=Object.defineProperty;var x=Object.getOwnPropertySymbols;var T=Object.prototype.hasOwnProperty,_=Object.prototype.propertyIsEnumerable;var g=(i,s,n)=>s in i?L(i,s,{enumerable:!0,configurable:!0,writable:!0,value:n}):i[s]=n,l=(i,s)=>{for(var n in s||(s={}))T.call(s,n)&&g(i,n,s[n]);if(x)for(var n of x(s))_.call(s,n)&&g(i,n,s[n]);return i};import{r as j,j as t}from"./main-406.js";import{_ as a,L as P,N as S}from"./bi.394.85.js";import{d as z}from"./bi.104.919.js";import{T as y,t as K}from"./bi.150.760.js";function V({salesflareConf:i,setSalesflareConf:s,step:n,setStep:k,loading:o,setLoading:N,isInfo:r}){const[c,A]=j.useState(!1),[m,u]=j.useState({api_token:""}),{salesflare:e}=K,v=()=>{setTimeout(()=>{document.getElementById("btcd-settings-wrp").scrollTop=0},300),i!=null&&i.default,k(2)},b=d=>{const p=l({},i),h=l({},m);h[d.target.name]="",p[d.target.name]=d.target.value,u(h),s(p)},I=`
            <h4>Get API Key</h4>
            <ul>
                <li>Go to your Salesflare user dashboard</li>
                <li>Then click "Settings"</li>
                <li>Then click "API Keys → Generates Keys"</li>
            </ul>`;return t.jsxs("div",{className:"btcd-stp-page",style:{width:n===1&&900,height:n===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:a("Integration Name:","bit-integrations")})}),t.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:b,name:"name",value:i.name,type:"text",placeholder:a("Integration Name...","bit-integrations"),disabled:r}),t.jsx("div",{className:"mt-3",children:t.jsx("b",{children:a("API Key:","bit-integrations")})}),t.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:b,name:"api_key",value:i.api_key,type:"text",placeholder:a("API Key...","bit-integrations"),disabled:r}),t.jsx("div",{style:{color:"red",fontSize:"15px"},children:m.api_key}),t.jsxs("small",{className:"d-blk mt-3",children:[a("To Get API Key, Please Visit","bit-integrations")," ",t.jsx("a",{className:"btcd-link",href:"https://app.salesflare.com/#/settings/apikeys",target:"_blank",children:a("Salesflare API Key","bit-integrations")})]}),t.jsx("br",{}),t.jsx("br",{}),!r&&t.jsxs("div",{children:[t.jsxs("button",{onClick:()=>z(i,u,A,o,N),className:"btn btcd-btn-lg purple sh-sm flx",type:"button",disabled:c||o.auth,children:[c?a("Authorized ✔","bit-integrations"):a("Authorize","bit-integrations"),o.auth&&t.jsx(P,{size:"20",clr:"#022217",className:"ml-2"})]}),t.jsx("br",{}),t.jsxs("button",{onClick:v,className:"btn ml-auto btcd-btn-lg purple sh-sm flx",type:"button",disabled:!c,children:[a("Next","bit-integrations"),t.jsx("div",{className:"btcd-icn icn-arrow_back rev-icn d-in-b"})]})]}),t.jsx(S,{note:I})]})}export{V as default};
