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