var k=Object.defineProperty;var j=Object.getOwnPropertySymbols;var z=Object.prototype.hasOwnProperty,I=Object.prototype.propertyIsEnumerable;var N=(a,i,n)=>i in a?k(a,i,{enumerable:!0,configurable:!0,writable:!0,value:n}):a[i]=n,m=(a,i)=>{for(var n in i||(i={}))z.call(i,n)&&N(a,n,i[n]);if(j)for(var n of j(i))I.call(i,n)&&N(a,n,i[n]);return a};import{k as C,f as E,_ as e,j as t}from"./main.2.8.10.js";import{b as y}from"./react-router.DMwpH23k.js";import{B as _}from"./BackIcn.BFDZx8No.js";import{a2 as v,y as T,a9 as O}from"./Note.DalStCGz.js";import{a as P,z as U}from"./ZoomCommonFunc.DA-mU_Ge.js";import{T as B}from"./TutorialLink.D6K_DiHL.js";import"./react-vendor.P7K3d6op.js";import"./CopyIcn.BnhKHfEP.js";function J({formID:a,zoomWebinarConf:i,setZoomWebinarConf:n,step:b,setStep:w,isLoading:$,setIsLoading:h,setSnackbar:r,redirectLocation:S,isInfo:s}){const[l,A]=y.useState(!1),[c,p]=y.useState({clientId:"",clientSecret:""}),g=C(E),o=d=>{const x=m({},i),u=m({},c);u[d.target.name]="",x[d.target.name]=d.target.value,p(u),n(x)},R=()=>{U(a,i,n,h,r),w(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:b===1&&900,height:b===1&&"100%"},children:[t.jsx(B,{linkKey:"zoomWebinar"}),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:s}),t.jsx("div",{className:"mt-3",children:t.jsx("b",{children:e("Homepage URL:","bit-integrations")})}),t.jsx(v,{value:`${window.location.origin}`,className:"field-key-cpy w-6 ml-0",readOnly:s,setSnackbar:r}),t.jsx("div",{className:"mt-3",children:t.jsx("b",{children:e("Authorized Redirect URIs:","bit-integrations")})}),t.jsx(v,{value:S||`${g.api}/redirect`,className:"field-key-cpy w-6 ml-0",readOnly:s,setSnackbar:r}),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:s}),t.jsx("div",{style:{color:"red",fontSize:"15px"},children:c.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:s}),t.jsx("div",{style:{color:"red",fontSize:"15px"},children:c.clientSecret}),!s&&t.jsxs(t.Fragment,{children:[t.jsxs("button",{onClick:()=>P(i,n,p,A,h,r,g),className:"btn btcd-btn-lg purple sh-sm flx",type:"button",disabled:l,children:[l?e("Authorized ✔","bit-integrations"):e("Authorize","bit-integrations"),$&&t.jsx(T,{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:!l,children:[e("Next","bit-integrations"),t.jsx(_,{className:"ml-1 rev-icn"})]})]}),t.jsx(O,{note:f})]})}export{J as default};
