var T=Object.defineProperty;var x=Object.getOwnPropertySymbols;var _=Object.prototype.hasOwnProperty,I=Object.prototype.propertyIsEnumerable;var g=(e,i,a)=>i in e?T(e,i,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[i]=a,m=(e,i)=>{for(var a in i||(i={}))_.call(i,a)&&g(e,a,i[a]);if(x)for(var a of x(i))I.call(i,a)&&g(e,a,i[a]);return e};import{j as t,_ as s}from"./main.2.8.1.js";import{d as j}from"./react-router-dom.9mCuUg3q.js";import{z as L}from"./Note.BeM7sN-p.js";import{z as f}from"./ZendeskCommonFunc.DBXSjfPv.js";import{t as w}from"./tutorialLinks.kMkIDzcD.js";import{T as y}from"./TutorialLink.BAFX--T3.js";import"./CopyIcn.3gZpHton.js";function V({zendeskConf:e,setZendeskConf:i,step:a,setStep:N,loading:n,setLoading:k,isInfo:o}){const[l,v]=j.useState(!1),[d,p]=j.useState({api_key:""}),{zendesk:r}=w,A=()=>{setTimeout(()=>{document.getElementById("btcd-settings-wrp").scrollTop=0},300),e!=null&&e.default,N(2)},b=c=>{const u=m({},e),h=m({},d);h[c.target.name]="",u[c.target.name]=c.target.value,p(h),i(u)};return t.jsxs("div",{className:"btcd-stp-page",style:{width:a===1&&900,height:a===1&&"auto"},children:[t.jsx(y,{title:"Zendesk",youTubeLink:r==null?void 0:r.youTubeLink}),t.jsx(y,{title:"Zendesk",docLink:r==null?void 0:r.docLink}),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:b,name:"name",value:e.name,type:"text",placeholder:s("Integration Name...","bit-integrations"),disabled:o}),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:b,name:"api_key",value:e.api_key,type:"text",placeholder:s("API Token...","bit-integrations"),disabled:o}),t.jsx("div",{style:{color:"red",fontSize:"15px"},children:d.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",{}),!o&&t.jsxs("div",{children:[t.jsxs("button",{onClick:()=>f(e,i,p,v,n,k),className:"btn btcd-btn-lg purple sh-sm flx",type:"button",disabled:l||n.auth,children:[l?s("Authorized ✔","bit-integrations"):s("Authorize","bit-integrations"),n.auth&&t.jsx(L,{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:[s("Next","bit-integrations"),t.jsx("div",{className:"btcd-icn icn-arrow_back rev-icn d-in-b"})]})]})]})}export{V as default};
