var R=Object.defineProperty;var j=Object.getOwnPropertySymbols;var C=Object.prototype.hasOwnProperty,w=Object.prototype.propertyIsEnumerable;var N=(i,s,a)=>s in i?R(i,s,{enumerable:!0,configurable:!0,writable:!0,value:a}):i[s]=a,m=(i,s)=>{for(var a in s||(s={}))C.call(s,a)&&N(i,a,s[a]);if(j)for(var a of j(s))w.call(s,a)&&N(i,a,s[a]);return i};import{r as v,h as z,j as t}from"./main-406.js";import{k as S,_ as r,X as _,L as k,N as U}from"./bi.394.85.js";import{d as V}from"./bi.358.895.js";import{T as y,t as P}from"./bi.150.760.js";function O({lionDeskConf:i,setLionDeskConf:s,step:a,setStep:T,setSnackbar:b,isLoading:p,setIsLoading:E,isInfo:n}){const[l,L]=v.useState(!1),[c,h]=v.useState({session_token:""}),u=z(S),{lionDesk:e}=P,A=()=>{setTimeout(()=>{document.getElementById("btcd-settings-wrp").scrollTop=0},300),i!=null&&i.default,T(2)},d=o=>{const x=m({},i),g=m({},c);g[o.target.name]="",x[o.target.name]=o.target.value,h(g),s(x)},I=`
            <h4>Get the Redirect URI, Client Id and Client Secret</h4>
            <ul>
                <li>First go to your Lion Desk Developer Center Apps.</li>
                <li>Then Click "New App+" from Right in the middle</li>
                <li>Then input the "Name and Redirect URI" then save</li>
                <li>Then click "REVEAL CLIENT ID" and "REVEAL CLIENT SECRET", Then Copied</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(y,{title:e==null?void 0:e.title,youTubeLink:e==null?void 0:e.youTubeLink}),(e==null?void 0:e.docLink)&&t.jsx(y,{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:d,name:"name",value:i.name,type:"text",placeholder:r("Integration Name...","bit-integrations"),disabled:n}),t.jsx("div",{className:"mt-3",children:t.jsx("b",{children:r("Authorized Redirect URIs:","bit-integrations")})}),t.jsx(_,{value:`${u.api.base}/redirect`,setSnackbar:b,className:"field-key-cpy w-6 ml-0",readOnly:n}),t.jsx("div",{className:"mt-3",children:t.jsx("b",{children:r("Client id:","bit-integrations")})}),t.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:d,name:"clientId",value:i.clientId,type:"text",placeholder:r("Client id...","bit-integrations"),disabled:n}),t.jsx("div",{style:{color:"red"},children:c.clientId}),t.jsx("div",{className:"mt-3",children:t.jsx("b",{children:r("Client secret:","bit-integrations")})}),t.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:d,name:"clientSecret",value:i.clientSecret,type:"text",placeholder:r("Client secret...","bit-integrations"),disabled:n}),t.jsx("div",{style:{color:"red"},children:c.clientSecret}),t.jsxs("small",{className:"d-blk mt-3",children:[r("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:r("Lion Desk Apps","bit-integrations")})]}),t.jsx("br",{}),t.jsx("br",{}),!n&&t.jsxs("div",{children:[t.jsxs("button",{onClick:()=>V("lionDesk","lionDesk",i,s,h,L,E,b,u),className:"btn btcd-btn-lg purple sh-sm flx",type:"button",disabled:l||p,children:[l?r("Authorized ✔","bit-integrations"):r("Authorize","bit-integrations"),p&&t.jsx(k,{size:"20",clr:"#022217",className:"ml-2"})]}),t.jsx("br",{}),t.jsxs("button",{onClick:A,className:"btn ml-auto btcd-btn-lg purple sh-sm flx",type:"button",disabled:!l,children:[r("Next","bit-integrations"),t.jsx("div",{className:"btcd-icn icn-arrow_back rev-icn d-in-b"})]})]}),t.jsx(U,{note:I})]})}export{O as default};
