var I=Object.defineProperty;var g=Object.getOwnPropertySymbols;var f=Object.prototype.hasOwnProperty,E=Object.prototype.propertyIsEnumerable;var N=(l,i,s)=>i in l?I(l,i,{enumerable:!0,configurable:!0,writable:!0,value:s}):l[i]=s,h=(l,i)=>{for(var s in i||(i={}))f.call(i,s)&&N(l,s,i[s]);if(g)for(var s of g(i))E.call(i,s)&&N(l,s,i[s]);return l};import{r as y,h as _,j as e}from"./main-406.js";import{k as O,_ as a,X as v,L as P,N as U}from"./bi.394.85.js";import{B as $}from"./bi.46.744.js";import{a as B,z as Z}from"./bi.2.783.js";import{T as k,t as q}from"./bi.150.760.js";function J({formID:l,zoomConf:i,setZoomConf:s,step:m,setStep:w,isLoading:A,setIsLoading:u,setSnackbar:r,redirectLocation:L,isInfo:n}){const[c,R]=y.useState(!1),[d,p]=y.useState({clientId:"",clientSecret:""}),S=_(O),{zoomMeeting:t}=q,o=b=>{const x=h({},i),j=h({},d);j[b.target.name]="",x[b.target.name]=b.target.value,p(j),s(x)},C=()=>{Z(l,i,s,u,r),w(2)},T=`<h4>Pro or higher plan only .</h4>
  <h4>Client Id and Client Secret generate with OAuth .</h4>
  <h4>Scope:</h4>
  <ul>
      <li>User:<b>'user:master, user:read:admin, user:write:admin'</b> </li>
      <li>Meeting:<b>'meeting:master, meeting:read:admin, meeting:write:admin'</b> </li>
  </ul>
  <h4>Redirect URIs add also in <b>'Add allow lists'</b></h4>
  <h4>Zoom Settings :</h4>
  <ul>
      <li>Registration:<b>Required</b> </li>
      <li>Participant:<b>On</b> </li>
  </ul>

  `;return e.jsxs("div",{className:"btcd-stp-page",style:{width:m===1&&900,height:m===1&&"100%"},children:[(t==null?void 0:t.youTubeLink)&&e.jsx(k,{title:t==null?void 0:t.title,youTubeLink:t==null?void 0:t.youTubeLink}),(t==null?void 0:t.docLink)&&e.jsx(k,{title:t==null?void 0:t.title,docLink:t==null?void 0:t.docLink}),e.jsx("div",{className:"mt-3",children:e.jsx("b",{children:a("Integration Name:","bit-integrations")})}),e.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:o,name:"name",value:i.name,type:"text",placeholder:a("Integration Name...","bit-integrations"),disabled:n}),e.jsx("div",{className:"mt-3",children:e.jsx("b",{children:a("Homepage URL:","bit-integrations")})}),e.jsx(v,{value:`${window.location.origin}`,className:"field-key-cpy w-6 ml-0",readOnly:n,setSnackbar:r}),e.jsx("div",{className:"mt-3",children:e.jsx("b",{children:a("Authorized Redirect URIs:","bit-integrations")})}),e.jsx(v,{value:L||`${S.api.base}/redirect`,className:"field-key-cpy w-6 ml-0",readOnly:n,setSnackbar:r}),e.jsxs("small",{className:"d-blk mt-5",children:[a("To get Client ID and SECRET , Please Visit","bit-integrations")," ",e.jsx("a",{className:"btcd-link",href:"https://marketplace.zoom.us/develop/create",target:"_blank",rel:"noreferrer",children:a("Get Zoom client id and secret","bit-integrations")})]}),e.jsx("div",{className:"mt-3",children:e.jsx("b",{children:a("Client id:","bit-integrations")})}),e.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:o,name:"clientId",value:i.clientId,type:"text",placeholder:a("Client id...","bit-integrations"),disabled:n}),e.jsx("div",{style:{color:"red",fontSize:"15px"},children:d.clientId}),e.jsx("div",{className:"mt-3",children:e.jsx("b",{children:a("Client secret:","bit-integrations")})}),e.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:o,name:"clientSecret",value:i.clientSecret,type:"text",placeholder:a("Client secret...","bit-integrations"),disabled:n}),e.jsx("div",{style:{color:"red",fontSize:"15px"},children:d.clientSecret}),!n&&e.jsxs(e.Fragment,{children:[e.jsxs("button",{onClick:()=>B(i,s,p,R,u,r),className:"btn btcd-btn-lg purple sh-sm flx",type:"button",disabled:c,children:[c?a("Authorized ✔","bit-integrations"):a("Authorize","bit-integrations"),A&&e.jsx(P,{size:20,clr:"#022217",className:"ml-2"})]}),e.jsx("br",{}),e.jsxs("button",{onClick:()=>C(),className:"btn f-right btcd-btn-lg purple sh-sm flx",type:"button",disabled:!c,children:[a("Next","bit-integrations"),e.jsx($,{className:"ml-1 rev-icn"})]})]}),e.jsx(U,{note:T})]})}export{J as default};
