var A=Object.defineProperty;var g=Object.getOwnPropertySymbols;var R=Object.prototype.hasOwnProperty,C=Object.prototype.propertyIsEnumerable;var j=(i,s,n)=>s in i?A(i,s,{enumerable:!0,configurable:!0,writable:!0,value:n}):i[s]=n,o=(i,s)=>{for(var n in s||(s={}))R.call(s,n)&&j(i,n,s[n]);if(g)for(var n of g(s))C.call(s,n)&&j(i,n,s[n]);return i};import{k as S,f as k,_ as e,j as t}from"./main.2.9.0.js";import{b as N}from"./react-router.DMwpH23k.js";import{a2 as w,y as z,a9 as _}from"./Note.NSUdvR3c.js";import{d as L}from"./LionDeskCommonFunc.tUMMbjTU.js";import{T as $}from"./TutorialLink.CFG7bS5c.js";import"./react-vendor.P7K3d6op.js";import"./CopyIcn.CEA_lFLo.js";function O({lionDeskConf:i,setLionDeskConf:s,step:n,setStep:v,setSnackbar:m,isLoading:p,setIsLoading:y,isInfo:a}){const[r,E]=N.useState(!1),[l,b]=N.useState({session_token:""}),h=S(k),I=()=>{setTimeout(()=>{document.getElementById("btcd-settings-wrp").scrollTop=0},300),i!=null&&i.default,v(2)},c=d=>{const u=o({},i),x=o({},l);x[d.target.name]="",u[d.target.name]=d.target.value,b(x),s(u)},T=`
            <h4>${e("Get the Redirect URI, Client Id and Client Secret","bit-integrations")}</h4>
            <ul>
                <li>${e("First go to your Lion Desk Developer Center Apps.","bit-integrations")}</li>
                <li>${e('Then Click "New App+" from Right in the middle',"bit-integrations")}</li>
                <li>${e('Then input the "Name and Redirect URI" then save',"bit-integrations")}</li>
                <li>${e('Then click "REVEAL CLIENT ID" and "REVEAL CLIENT SECRET", Then Copied',"bit-integrations")}</li>
            </ul>`;return t.jsxs("div",{className:"btcd-stp-page",style:{width:n===1&&900,height:n===1&&"auto"},children:[t.jsx($,{linkKey:"lionDesk"}),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:c,name:"name",value:i.name,type:"text",placeholder:e("Integration Name...","bit-integrations"),disabled:a}),t.jsx("div",{className:"mt-3",children:t.jsx("b",{children:e("Authorized Redirect URIs:","bit-integrations")})}),t.jsx(w,{value:`${h.api}/redirect`,setSnackbar:m,className:"field-key-cpy w-6 ml-0",readOnly:a}),t.jsx("div",{className:"mt-3",children:t.jsx("b",{children:e("Client id:","bit-integrations")})}),t.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:c,name:"clientId",value:i.clientId,type:"text",placeholder:e("client ID...","bit-integrations"),disabled:a}),t.jsx("div",{style:{color:"red"},children:l.clientId}),t.jsx("div",{className:"mt-3",children:t.jsx("b",{children:e("Client secret:","bit-integrations")})}),t.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:c,name:"clientSecret",value:i.clientSecret,type:"text",placeholder:e("client Secret...","bit-integrations"),disabled:a}),t.jsx("div",{style:{color:"red"},children:l.clientSecret}),t.jsxs("small",{className:"d-blk mt-3",children:[e("To get Client ID and SECRET , Please Visit","bit-integrations")," ",t.jsx("a",{className:"btcd-link",href:"http://developers.liondesk.com/account/apps",target:"_blank",rel:"noreferrer",children:e("Lion Desk Apps","bit-integrations")})]}),t.jsx("br",{}),t.jsx("br",{}),!a&&t.jsxs("div",{children:[t.jsxs("button",{onClick:()=>L("lionDesk","lionDesk",i,s,b,E,y,m,h),className:"btn btcd-btn-lg purple sh-sm flx",type:"button",disabled:r||p,children:[r?e("Authorized ✔","bit-integrations"):e("Authorize","bit-integrations"),p&&t.jsx(z,{size:"20",clr:"#022217",className:"ml-2"})]}),t.jsx("br",{}),t.jsxs("button",{onClick:I,className:"btn ml-auto btcd-btn-lg purple sh-sm flx",type:"button",disabled:!r,children:[e("Next","bit-integrations"),t.jsx("div",{className:"btcd-icn icn-arrow_back rev-icn d-in-b"})]})]}),t.jsx(_,{note:T})]})}export{O as default};
