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