var A=Object.defineProperty;var u=Object.getOwnPropertySymbols;var _=Object.prototype.hasOwnProperty,v=Object.prototype.propertyIsEnumerable;var x=(i,s,a)=>s in i?A(i,s,{enumerable:!0,configurable:!0,writable:!0,value:a}):i[s]=a,d=(i,s)=>{for(var a in s||(s={}))_.call(s,a)&&x(i,a,s[a]);if(u)for(var a of u(s))v.call(s,a)&&x(i,a,s[a]);return i};import{_ as e,j as t}from"./main.2.9.0.js";import{b as g}from"./react-router.DMwpH23k.js";import{y as T,a9 as z}from"./Note.NSUdvR3c.js";import{g as w}from"./GravitecCommonFunc.CPnGVxOv.js";import{T as E}from"./TutorialLink.CFG7bS5c.js";import"./react-vendor.P7K3d6op.js";import"./CopyIcn.CEA_lFLo.js";function L({gravitecConf:i,setGravitecConf:s,step:a,setStep:j,loading:p,setLoading:y,isInfo:r}){const[o,k]=g.useState(!1),[n,m]=g.useState({site_url:"",app_key:"",app_secret:""}),N=()=>{setTimeout(()=>{document.getElementById("btcd-settings-wrp").scrollTop=0},300),i!=null&&i.default,j(2)},l=c=>{const b=d({},i),h=d({},n);h[c.target.name]="",b[c.target.name]=c.target.value,m(h),s(b)},S=`
            <h4>${e("To Get App key & App Secret","bit-integrations")}</h4>
            <ul>
                <li>${e("First go to your Gravitec dashboard.","bit-integrations")}</li>
                <li>${e('Click go to your "YOUR SITES" from left SideBar',"bit-integrations")}</li>
                <li>${e('Then click "Settings"',"bit-integrations")}</li>
                <li>${e('Then Click "REST API"',"bit-integrations")}</li>
            </ul>`;return t.jsxs("div",{className:"btcd-stp-page",style:{width:a===1&&900,height:a===1&&"auto"},children:[t.jsx(E,{linkKey:"gravitec"}),t.jsx("div",{className:"mt-3",children:t.jsx("b",{children:e("Integration Name:","bit-integrations")})}),t.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:l,name:"name",value:i.name,type:"text",placeholder:e("Integration Name...","bit-integrations"),disabled:r}),t.jsx("div",{className:"mt-3",children:t.jsx("b",{children:e("Site Url:","bit-integrations")})}),t.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:l,name:"site_url",value:i.site_url,type:"text",placeholder:e("Site Url...","bit-integrations"),disabled:r}),t.jsx("div",{style:{color:"red",fontSize:"15px"},children:n.site_url}),t.jsx("div",{className:"mt-3",children:t.jsx("b",{children:e("App key:","bit-integrations")})}),t.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:l,name:"app_key",value:i.app_key,type:"text",placeholder:e("App key...","bit-integrations"),disabled:r}),t.jsx("div",{style:{color:"red",fontSize:"15px"},children:n.app_key}),t.jsx("div",{className:"mt-3",children:t.jsx("b",{children:e("App Secret:","bit-integrations")})}),t.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:l,name:"app_secret",value:i.app_secret,type:"text",placeholder:e("App Secret...","bit-integrations"),disabled:r}),t.jsx("div",{style:{color:"red",fontSize:"15px"},children:n.app_secret}),t.jsxs("small",{className:"d-blk mt-3",children:[e("To Get App key & App Secret, Please Visit","bit-integrations")," ",t.jsx("a",{className:"btcd-link",href:"https://push.gravitec.net/push/1767754253528465408/settings/api",target:"_blank",children:e("Gravitec App key & Secret","bit-integrations")})]}),t.jsx("br",{}),t.jsx("br",{}),!r&&t.jsxs("div",{children:[t.jsxs("button",{onClick:()=>w(i,s,m,k,p,y),className:"btn btcd-btn-lg purple sh-sm flx",type:"button",disabled:o||p.auth,children:[o?e("Authorized ✔","bit-integrations"):e("Authorize","bit-integrations"),p.auth&&t.jsx(T,{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:!o,children:[e("Next","bit-integrations"),t.jsx("div",{className:"btcd-icn icn-arrow_back rev-icn d-in-b"})]})]}),t.jsx(z,{note:S})]})}export{L as default};
