var C=Object.defineProperty;var N=Object.getOwnPropertySymbols;var L=Object.prototype.hasOwnProperty,T=Object.prototype.propertyIsEnumerable;var y=(a,i,n)=>i in a?C(a,i,{enumerable:!0,configurable:!0,writable:!0,value:n}):a[i]=n,b=(a,i)=>{for(var n in i||(i={}))L.call(i,n)&&y(a,n,i[n]);if(N)for(var n of N(i))T.call(i,n)&&y(a,n,i[n]);return a};import{k as z,g as E,_ as e,j as t}from"./main.2.8.1.js";import{d as v}from"./react-router-dom.9mCuUg3q.js";import{B as _}from"./BackIcn._kGL_vVw.js";import{a2 as k,z as O,a9 as P}from"./Note.BeM7sN-p.js";import{a as U,z as Z}from"./ZoomCommonFunc.bNmZvG8d.js";import{t as B}from"./tutorialLinks.kMkIDzcD.js";import{T as w}from"./TutorialLink.BAFX--T3.js";import"./CopyIcn.3gZpHton.js";function Q({formID:a,zoomConf:i,setZoomConf:n,step:h,setStep:$,isLoading:S,setIsLoading:p,setSnackbar:l,redirectLocation:A,isInfo:s}){const[c,R]=v.useState(!1),[o,g]=v.useState({clientId:"",clientSecret:""}),u=z(E),{zoomMeeting:r}=B,d=m=>{const x=b({},i),j=b({},o);j[m.target.name]="",x[m.target.name]=m.target.value,g(j),n(x)},f=()=>{Z(a,i,n,p,l),$(2)},I=`<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("Meeting:<b>'meeting:master, meeting:read:admin, meeting: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:[t.jsx(w,{title:"Zoom Meeting",youTubeLink:r==null?void 0:r.youTubeLink}),t.jsx(w,{title:"Zoom Meeting",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:d,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(k,{value:`${window.location.origin}`,className:"field-key-cpy w-6 ml-0",readOnly:s,setSnackbar:l}),t.jsx("div",{className:"mt-3",children:t.jsx("b",{children:e("Authorized Redirect URIs:","bit-integrations")})}),t.jsx(k,{value:A||`${u.api}/redirect`,className:"field-key-cpy w-6 ml-0",readOnly:s,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:d,name:"clientId",value:i.clientId,type:"text",placeholder:e("client ID...","bit-integrations"),disabled:s}),t.jsx("div",{style:{color:"red",fontSize:"15px"},children:o.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:d,name:"clientSecret",value:i.clientSecret,type:"text",placeholder:e("client Secret...","bit-integrations"),disabled:s}),t.jsx("div",{style:{color:"red",fontSize:"15px"},children:o.clientSecret}),!s&&t.jsxs(t.Fragment,{children:[t.jsxs("button",{onClick:()=>U(i,n,g,R,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"),S&&t.jsx(O,{size:20,clr:"#022217",className:"ml-2"})]}),t.jsx("br",{}),t.jsxs("button",{onClick:()=>f(),className:"btn f-right btcd-btn-lg purple sh-sm flx",type:"button",disabled:!c,children:[e("Next","bit-integrations"),t.jsx(_,{className:"ml-1 rev-icn"})]})]}),t.jsx(P,{note:I})]})}export{Q as default};
