var I=Object.defineProperty;var j=Object.getOwnPropertySymbols;var f=Object.prototype.hasOwnProperty,E=Object.prototype.propertyIsEnumerable;var N=(a,i,s)=>i in a?I(a,i,{enumerable:!0,configurable:!0,writable:!0,value:s}):a[i]=s,m=(a,i)=>{for(var s in i||(i={}))f.call(i,s)&&N(a,s,i[s]);if(j)for(var s of j(i))E.call(i,s)&&N(a,s,i[s]);return a};import{r as y,h as _,j as e}from"./main-406.js";import{k as O,_ as l,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.756.785.js";import{T as w,t as q}from"./bi.150.760.js";function J({formID:a,zoomWebinarConf:i,setZoomWebinarConf:s,step:u,setStep:k,isLoading:A,setIsLoading:p,setSnackbar:r,redirectLocation:L,isInfo:n}){const[c,R]=y.useState(!1),[d,b]=y.useState({clientId:"",clientSecret:""}),S=_(O),{zoomWebinar:t}=q,o=h=>{const x=m({},i),g=m({},d);g[h.target.name]="",x[h.target.name]=h.target.value,b(g),s(x)},C=()=>{Z(a,i,s,p,r),k(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>Webinar:<b>'webinar:master, webinar:read:admin, webinar: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:u===1&&900,height:u===1&&"100%"},children:[(t==null?void 0:t.youTubeLink)&&e.jsx(w,{title:t==null?void 0:t.title,youTubeLink:t==null?void 0:t.youTubeLink}),(t==null?void 0:t.docLink)&&e.jsx(w,{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:l("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:l("Integration Name...","bit-integrations"),disabled:n}),e.jsx("div",{className:"mt-3",children:e.jsx("b",{children:l("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:l("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:[l("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:l("Get Zoom client id and secret","bit-integrations")})]}),e.jsx("div",{className:"mt-3",children:e.jsx("b",{children:l("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:l("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:l("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:l("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,b,R,p,r),className:"btn btcd-btn-lg purple sh-sm flx",type:"button",disabled:c,children:[c?l("Authorized ✔","bit-integrations"):l("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:[l("Next","bit-integrations"),e.jsx($,{className:"ml-1 rev-icn"})]})]}),e.jsx(U,{note:T})]})}export{J as default};
