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