var _=Object.defineProperty;var h=Object.getOwnPropertySymbols;var f=Object.prototype.hasOwnProperty,$=Object.prototype.propertyIsEnumerable;var g=(i,s,n)=>s in i?_(i,s,{enumerable:!0,configurable:!0,writable:!0,value:n}):i[s]=n,b=(i,s)=>{for(var n in s||(s={}))f.call(s,n)&&g(i,n,s[n]);if(h)for(var n of h(s))$.call(s,n)&&g(i,n,s[n]);return i};import{_ as e,j as t}from"./main.2.8.10.js";import{b as x}from"./react-router.DMwpH23k.js";import{y as w,a9 as A}from"./Note.DalStCGz.js";import{T as C}from"./TutorialLink.D6K_DiHL.js";import{l as z}from"./LMFWCCommonFunc.BeFjrR5A.js";import"./react-vendor.P7K3d6op.js";import"./CopyIcn.BnhKHfEP.js";function U({licenseManagerConf:i,setLicenseManagerConf:s,step:n,setStep:j,loading:c,setLoading:y,isInfo:r}){const[a,k]=x.useState(!1),[o,d]=x.useState({api_key:"",api_secret:""}),v=()=>{setTimeout(()=>{document.getElementById("btcd-settings-wrp").scrollTop=0},300),a&&j(2)},l=m=>{const p=b({},i),u=b({},o);u[m.target.name]="",p[m.target.name]=m.target.value,d(u),s(p)},N=`
            <b>${e("Requirements","bit-integrations")}</b>
            <p>${e("WordPress permalinks must be enabled at","bit-integrations")}: <b>${e("Settings","bit-integrations")}</b> > <b>${e("Permalinks","bit-integrations")}</b></p>
            <h4>${e("To Get Consumer key & Consumer secret","bit-integrations")}</h4>
            <ul>
                <li>${e('First go to "WooCommerce"',"bit-integrations")}</li>
                <li>${e('Then go to "Settings" page',"bit-integrations")}</li>
                <li>${e('Click on "License Manager " from right top corner menu',"bit-integrations")}</li>
                <li>${e('Then click "REST API" from the top sub menu',"bit-integrations")}</li>
                <li>${e('Then click "Add key" button at the top of the page',"bit-integrations")}</li>
                <li>${e('FIll the form & click "Generate API Key"',"bit-integrations")}</li>
            </ul>`;return t.jsxs("div",{className:"btcd-stp-page",style:{width:n===1&&900,height:n===1&&"auto"},children:[t.jsx(C,{linkKey:"lmfwc"}),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("Homepage URL:","bit-integrations")})}),t.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:l,name:"baseUrl",value:i.base_url,type:"text",placeholder:e("Homepage URL...","bit-integrations"),disabled:r}),t.jsx("div",{style:{color:"red",fontSize:"15px"},children:o.base_url}),t.jsx("div",{className:"mt-3",children:t.jsx("b",{children:e("Consumer key:","bit-integrations")})}),t.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:l,name:"api_key",value:i.api_key,type:"text",placeholder:e("Consumer key...","bit-integrations"),disabled:r}),t.jsx("div",{style:{color:"red",fontSize:"15px"},children:o.api_key}),t.jsx("div",{className:"mt-3",children:t.jsx("b",{children:e("Consumer secret:","bit-integrations")})}),t.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:l,name:"api_secret",value:i.api_secret,type:"text",placeholder:e("Consumer secret...","bit-integrations"),disabled:r}),t.jsx("div",{style:{color:"red",fontSize:"15px"},children:o.api_secret}),t.jsx("br",{}),!r&&t.jsxs("div",{children:[t.jsxs("button",{onClick:()=>z(i,s,d,k,c,y),className:"btn btcd-btn-lg purple sh-sm flx",type:"button",disabled:a||c.auth,children:[a?e("Authorized ✔","bit-integrations"):e("Authorize","bit-integrations"),c.auth&&t.jsx(w,{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:!a,children:[e("Next","bit-integrations"),t.jsx("div",{className:"btcd-icn icn-arrow_back rev-icn d-in-b"})]})]}),t.jsx(A,{note:N})]})}export{U as default};
