var S=Object.defineProperty;var j=Object.getOwnPropertySymbols;var v=Object.prototype.hasOwnProperty,h=Object.prototype.propertyIsEnumerable;var k=(a,t,s)=>t in a?S(a,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):a[t]=s,b=(a,t)=>{for(var s in t||(t={}))v.call(t,s)&&k(a,s,t[s]);if(j)for(var s of j(t))h.call(t,s)&&k(a,s,t[s]);return a};import{k as G,g as _,j as e,_ as i}from"./main.2.8.1.js";import{d as N}from"./react-router-dom.9mCuUg3q.js";import{B as H}from"./BackIcn._kGL_vVw.js";import{z,a9 as T}from"./Note.BeM7sN-p.js";import{l as D}from"./HighLevelCommonFunc.DjRv4nFN.js";import{t as B}from"./tutorialLinks.kMkIDzcD.js";import{T as E}from"./TutorialLink.BAFX--T3.js";import{g as F}from"./ProUtilHelpers.fQlR3mWW.js";import"./CopyIcn.3gZpHton.js";function X({formID:a,highLevelConf:t,setHighLevelConf:s,step:p,setstep:I,isInfo:o,loading:c,setLoading:A}){const w=G(_),{isPro:u}=w,{highLevel:n}=B,[d,P]=N.useState(!1),[l,x]=N.useState({name:"",api_key:""}),r=m=>{const g=b({},t),y=b({},l);y[m.target.name]="",g[m.target.name]=m.target.value,x(y),s(g)},$=()=>{setTimeout(()=>{document.getElementById("btcd-settings-wrp").scrollTop=0},300),I(2)};return e.jsxs("div",{className:"btcd-stp-page",style:{width:p===1&&900,height:p===1&&"auto"},children:[n==null?void 0:n.youTubeLink,e.jsx(E,{title:"HighLevel",docLink:n==null?void 0:n.docLink}),e.jsx("div",{className:"mt-3 wdt-200",children:e.jsx("b",{children:i("Integration Name:","bit-integrations")})}),e.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:r,name:"name",value:t.name,type:"text",placeholder:i("Integration Name...","bit-integrations"),disabled:o}),e.jsx("div",{style:{color:"red",fontSize:"15px"},children:l.name}),e.jsx("div",{className:"mt-3",children:e.jsx("b",{children:i("Select Version:")})}),e.jsxs("div",{className:"flex items-center w-6 mt-3",children:[e.jsx("input",{id:"MailerLiteClassic",type:"radio",name:"version",value:"v1",className:"hidden",checked:!(t!=null&&t.version)||(t==null?void 0:t.version)==="v1",onChange:r}),e.jsxs("label",{for:"MailerLiteClassic",children:[e.jsx("span",{className:"w-4 h-4 inline-block mr-1 border border-grey"}),"HighLevel API V1"]})]}),e.jsxs("div",{className:"flex items-center mr-4 mt-2 mb-4",children:[e.jsx("input",{id:"MailerLiteNew",type:"radio",name:"version",value:"v2",className:"hidden",checked:(t==null?void 0:t.version)==="v2",onChange:r,disabled:!u}),e.jsxs("label",{for:"MailerLiteNew",children:[e.jsx("span",{className:"w-4 h-4 inline-block mr-1 border border-grey"}),u?"HighLevel API V2":F("HighLevel API V2")]})]}),(t==null?void 0:t.version)==="v2"&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"mt-3 wdt-250",children:e.jsx("b",{children:i("Location ID:","bit-integrations")})}),e.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:r,name:"location_id",value:t.location_id,type:"text",placeholder:i("Location ID...","bit-integrations"),disabled:o}),e.jsx("div",{style:{color:"red",fontSize:"15px"},children:l.location_id}),e.jsx("small",{className:"d-blk mt-1",children:i("To get location id, go to Settings > Business Profile and copy the location id from General Information.","bit-integrations")})]}),e.jsx("div",{className:"mt-3 wdt-250",children:e.jsx("b",{children:i("GoHighLevel Api Key:","bit-integrations")})}),e.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:r,name:"api_key",value:t.api_key,type:"text",placeholder:i("GoHighLevel Api Key...","bit-integrations"),disabled:o}),e.jsx("div",{style:{color:"red",fontSize:"15px"},children:l.api_key}),e.jsx("small",{className:"d-blk mt-3",children:!(t!=null&&t.version)||(t==null?void 0:t.version)==="v1"?i("To get API key, go to Settings > Business Profile and copy the API Key from there.","bit-integrations"):i("To get API key, go to Settings > Private Integration and create new integration and copy the API token.","bit-integrations")}),e.jsx("br",{}),!o&&e.jsxs(e.Fragment,{children:[e.jsxs("button",{onClick:()=>D(t,s,x,P,c,A),className:"btn btcd-btn-lg purple sh-sm flx",type:"button",disabled:d||c.auth,children:[d?i("Authorized ✔","bit-integrations"):i("Authorize","bit-integrations"),c.auth&&e.jsx(z,{size:20,clr:"#022217",className:"ml-2"})]}),e.jsx("br",{}),e.jsxs("button",{onClick:()=>$(),className:"btn f-right btcd-btn-lg purple sh-sm flx",type:"button",disabled:!d,children:[i("Next","bit-integrations"),e.jsx(H,{className:"ml-1 rev-icn"})]})]}),e.jsx(T,{note:K(t==null?void 0:t.version)})]})}const K=a=>a!=="v2"?`
            <h4>${i("Get GoHighLevel Api Key","bit-integrations")}</h4>
            <ul>
                <li>${i("First go to your GoHighLevel sub account settings then business profile tab","bit-integrations")}.</li>
                <li>${i("Copy the the API key.","bit-integrations")}</li>
                <li>${i("You can also get the API key from Agency view. Navigate to settings then API keys tab.","bit-integrations")}</li>
            </ul>`:`
            <h4>${i("Get GoHighLevel Location ID","bit-integrations")}</h4>
            <ul>
                <li>${i("From the Sub-Account Dashboard, go to Settings in lower right-hand corner","bit-integrations")}.</li>
                <li>${i("Select Business Profile on the left-side navigation bar.","bit-integrations")}</li>
                <li>${i("The Location ID will be visible as shown in General Information.","bit-integrations")}</li>
                <li>${i("Copy the location ID.","bit-integrations")}</li>
            </ul>
            <h4>${i("Get GoHighLevel Api Key","bit-integrations")}</h4>
            <ul>
                <li>${i("First go to your GoHighLevel sub account settings then Private Integration tab","bit-integrations")}.</li>
                <li>${i('Click on "Create new Integration"',"bit-integrations")}</li>
                <li>${i("Give your Private Integration a name and description to help you and your team identify what it's for.","bit-integrations")}</li>
                <li>${i("Select the scopes/permissions that you want the private integration to have access to on your agency  account. Ensure that you are selecting only the required scopes for better data security.","bit-integrations")}</li>
                <li>${i("Copy the token generated.","bit-integrations")}</li>
            </ul>`;export{X as default};
