var v=Object.defineProperty;var h=Object.getOwnPropertySymbols;var A=Object.prototype.hasOwnProperty,_=Object.prototype.propertyIsEnumerable;var x=(e,a,i)=>a in e?v(e,a,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[a]=i,c=(e,a)=>{for(var i in a||(a={}))A.call(a,i)&&x(e,i,a[i]);if(h)for(var i of h(a))_.call(a,i)&&x(e,i,a[i]);return e};import{j as t,_ as s}from"./main.2.8.10.js";import{b as g}from"./react-router.DMwpH23k.js";import{y as T}from"./Note.DalStCGz.js";import{z as I}from"./ZendeskCommonFunc.D0eLVJw_.js";import{T as w}from"./TutorialLink.D6K_DiHL.js";import"./react-vendor.P7K3d6op.js";import"./CopyIcn.BnhKHfEP.js";function G({zendeskConf:e,setZendeskConf:a,step:i,setStep:j,loading:r,setLoading:y,isInfo:n}){const[l,N]=g.useState(!1),[m,d]=g.useState({api_key:""}),k=()=>{setTimeout(()=>{document.getElementById("btcd-settings-wrp").scrollTop=0},300),e!=null&&e.default,j(2)},p=o=>{const b=c({},e),u=c({},m);u[o.target.name]="",b[o.target.name]=o.target.value,d(u),a(b)};return t.jsxs("div",{className:"btcd-stp-page",style:{width:i===1&&900,height:i===1&&"auto"},children:[t.jsx(w,{linkKey:"zendesk"}),t.jsx("div",{className:"mt-3",children:t.jsx("b",{children:s("Integration Name:","bit-integrations")})}),t.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:p,name:"name",value:e.name,type:"text",placeholder:s("Integration Name...","bit-integrations"),disabled:n}),t.jsx("div",{className:"mt-3",children:t.jsx("b",{children:s("API Key:","bit-integrations")})}),t.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:p,name:"api_key",value:e.api_key,type:"text",placeholder:s("API Token...","bit-integrations"),disabled:n}),t.jsx("div",{style:{color:"red",fontSize:"15px"},children:m.api_key}),t.jsxs("small",{className:"d-blk mt-3",children:[s("To Get API Token, Please Visit","bit-integrations")," ",t.jsx("a",{className:"btcd-link",href:"https://app.futuresimple.com/settings/oauth",target:"_blank",rel:"noreferrer",children:s("Zendesk API Token","bit-integrations")})]}),t.jsx("br",{}),t.jsx("br",{}),!n&&t.jsxs("div",{children:[t.jsxs("button",{onClick:()=>I(e,a,d,N,r,y),className:"btn btcd-btn-lg purple sh-sm flx",type:"button",disabled:l||r.auth,children:[l?s("Authorized ✔","bit-integrations"):s("Authorize","bit-integrations"),r.auth&&t.jsx(T,{size:"20",clr:"#022217",className:"ml-2"})]}),t.jsx("br",{}),t.jsxs("button",{onClick:k,className:"btn ml-auto btcd-btn-lg purple sh-sm flx",type:"button",disabled:!l,children:[s("Next","bit-integrations"),t.jsx("div",{className:"btcd-icn icn-arrow_back rev-icn d-in-b"})]})]})]})}export{G as default};
