var I=Object.defineProperty;var N=Object.getOwnPropertySymbols;var C=Object.prototype.hasOwnProperty,z=Object.prototype.propertyIsEnumerable;var y=(s,i,n)=>i in s?I(s,i,{enumerable:!0,configurable:!0,writable:!0,value:n}):s[i]=n,b=(s,i)=>{for(var n in i||(i={}))C.call(i,n)&&y(s,n,i[n]);if(N)for(var n of N(i))z.call(i,n)&&y(s,n,i[n]);return s};import{k as E,g as L,_ as e,j as t}from"./main.2.8.1.js";import{d as v}from"./react-router-dom.9mCuUg3q.js";import{B as T}from"./BackIcn._kGL_vVw.js";import{a2 as w,z as _,a9 as O}from"./Note.BeM7sN-p.js";import{a as P,z as U}from"./ZoomCommonFunc.CzEI5nUi.js";import{t as Z}from"./tutorialLinks.kMkIDzcD.js";import{T as B}from"./TutorialLink.BAFX--T3.js";import"./CopyIcn.3gZpHton.js";function Q({formID:s,zoomWebinarConf:i,setZoomWebinarConf:n,step:h,setStep:$,isLoading:k,setIsLoading:p,setSnackbar:l,redirectLocation:S,isInfo:a}){const[c,A]=v.useState(!1),[d,g]=v.useState({clientId:"",clientSecret:""}),u=E(L),{zoomWebinar:r}=Z,o=m=>{const x=b({},i),j=b({},d);j[m.target.name]="",x[m.target.name]=m.target.value,g(j),n(x)},R=()=>{U(s,i,n,p,l),$(2)},f=`<h4>${e("Pro or higher plan only .","bit-integrations")}</h4>
  <h4>${e("Client Id and Client Secret generate with OAuth .","bit-integrations")}</h4>
  <h4>${e("Scope:","bit-integrations")}</h4>
  <ul>
      <li>${e("User:<b>'user:master, user:read:admin, user:write:admin'</b> ","bit-integrations")}</li>
      <li>${e("Webinar:<b>'webinar:master, webinar:read:admin, webinar:write:admin'</b> ","bit-integrations")}</li>
  </ul>
  <h4>${e("Redirect URIs add also in <b>'Add allow lists'</b>","bit-integrations")}</h4>
  <h4>${e("Zoom Settings :","bit-integrations")}</h4>
  <ul>
      <li>${e("Registration:<b>Required</b>","bit-integrations")}</li>
      <li>${e("Participant:<b>On</b>","bit-integrations")}</li>
  </ul>
  `;return t.jsxs("div",{className:"btcd-stp-page",style:{width:h===1&&900,height:h===1&&"100%"},children:[r==null?void 0:r.youTubeLink,t.jsx(B,{title:"Zoom Webinars",docLink:r==null?void 0:r.docLink}),t.jsx("div",{className:"mt-3",children:t.jsx("b",{children:e("Integration Name:","bit-integrations")})}),t.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:o,name:"name",value:i.name,type:"text",placeholder:e("Integration Name...","bit-integrations"),disabled:a}),t.jsx("div",{className:"mt-3",children:t.jsx("b",{children:e("Homepage URL:","bit-integrations")})}),t.jsx(w,{value:`${window.location.origin}`,className:"field-key-cpy w-6 ml-0",readOnly:a,setSnackbar:l}),t.jsx("div",{className:"mt-3",children:t.jsx("b",{children:e("Authorized Redirect URIs:","bit-integrations")})}),t.jsx(w,{value:S||`${u.api}/redirect`,className:"field-key-cpy w-6 ml-0",readOnly:a,setSnackbar:l}),t.jsxs("small",{className:"d-blk mt-5",children:[e("To get Client ID and SECRET , Please Visit","bit-integrations")," ",t.jsx("a",{className:"btcd-link",href:"https://marketplace.zoom.us/develop/create",target:"_blank",rel:"noreferrer",children:e("Get Zoom client id and secret","bit-integrations")})]}),t.jsx("div",{className:"mt-3",children:t.jsx("b",{children:e("Client id:","bit-integrations")})}),t.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:o,name:"clientId",value:i.clientId,type:"text",placeholder:e("client ID...","bit-integrations"),disabled:a}),t.jsx("div",{style:{color:"red",fontSize:"15px"},children:d.clientId}),t.jsx("div",{className:"mt-3",children:t.jsx("b",{children:e("Client secret:","bit-integrations")})}),t.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:o,name:"clientSecret",value:i.clientSecret,type:"text",placeholder:e("client Secret...","bit-integrations"),disabled:a}),t.jsx("div",{style:{color:"red",fontSize:"15px"},children:d.clientSecret}),!a&&t.jsxs(t.Fragment,{children:[t.jsxs("button",{onClick:()=>P(i,n,g,A,p,l,u),className:"btn btcd-btn-lg purple sh-sm flx",type:"button",disabled:c,children:[c?e("Authorized ✔","bit-integrations"):e("Authorize","bit-integrations"),k&&t.jsx(_,{size:20,clr:"#022217",className:"ml-2"})]}),t.jsx("br",{}),t.jsxs("button",{onClick:()=>R(),className:"btn f-right btcd-btn-lg purple sh-sm flx",type:"button",disabled:!c,children:[e("Next","bit-integrations"),t.jsx(T,{className:"ml-1 rev-icn"})]})]}),t.jsx(O,{note:f})]})}export{Q as default};
