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 t,j as e}from"./main.2.9.0.js";import{b as y}from"./react-router.DMwpH23k.js";import{B as _}from"./BackIcn._8Wofmn2.js";import{a2 as v,y as T,a9 as O}from"./Note.NSUdvR3c.js";import{a as P,z as U}from"./ZoomCommonFunc.B30i7U7J.js";import{T as M}from"./TutorialLink.CFG7bS5c.js";import"./react-vendor.P7K3d6op.js";import"./CopyIcn.CEA_lFLo.js";function V({formID:a,zoomConf:i,setZoomConf: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>${t("Pro or higher plan only .","bit-integrations")}</h4>
  <h4>${t("Client Id and Client Secret generate with OAuth .","bit-integrations")}</h4>
  <h4>${t("Scope:","bit-integrations")}</h4>
  <ul>
      <li>${t("User:<b>'user:master, user:read:admin, user:write:admin'</b> ","bit-integrations")}</li>
      <li>${t("Meeting:<b>'meeting:master, meeting:read:admin, meeting:write:admin'</b> ","bit-integrations")}</li>
  </ul>
  <h4>${t("Redirect URIs add also in <b>'Add allow lists'</b>","bit-integrations")}</h4>
  <h4>${t("Zoom Settings :","bit-integrations")}</h4>
  <ul>
      <li>${t("Registration:<b>Required</b>","bit-integrations")}</li>
      <li>${t("Participant:<b>On</b>","bit-integrations")}</li>
  </ul>

  `;return e.jsxs("div",{className:"btcd-stp-page",style:{width:b===1&&900,height:b===1&&"100%"},children:[e.jsx(M,{linkKey:"zoomMeeting"}),e.jsx("div",{className:"mt-3",children:e.jsx("b",{children:t("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:t("Integration Name...","bit-integrations"),disabled:s}),e.jsx("div",{className:"mt-3",children:e.jsx("b",{children:t("Homepage URL:","bit-integrations")})}),e.jsx(v,{value:`${window.location.origin}`,className:"field-key-cpy w-6 ml-0",readOnly:s,setSnackbar:r}),e.jsx("div",{className:"mt-3",children:e.jsx("b",{children:t("Authorized Redirect URIs:","bit-integrations")})}),e.jsx(v,{value:S||`${g.api}/redirect`,className:"field-key-cpy w-6 ml-0",readOnly:s,setSnackbar:r}),e.jsxs("small",{className:"d-blk mt-5",children:[t("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:t("Get Zoom client id and secret","bit-integrations")})]}),e.jsx("div",{className:"mt-3",children:e.jsx("b",{children:t("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:t("client ID...","bit-integrations"),disabled:s}),e.jsx("div",{style:{color:"red",fontSize:"15px"},children:c.clientId}),e.jsx("div",{className:"mt-3",children:e.jsx("b",{children:t("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:t("client Secret...","bit-integrations"),disabled:s}),e.jsx("div",{style:{color:"red",fontSize:"15px"},children:c.clientSecret}),!s&&e.jsxs(e.Fragment,{children:[e.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?t("Authorized ✔","bit-integrations"):t("Authorize","bit-integrations"),$&&e.jsx(T,{size:20,clr:"#022217",className:"ml-2"})]}),e.jsx("br",{}),e.jsxs("button",{onClick:()=>R(),className:"btn f-right btcd-btn-lg purple sh-sm flx",type:"button",disabled:!l,children:[t("Next","bit-integrations"),e.jsx(_,{className:"ml-1 rev-icn"})]})]}),e.jsx(O,{note:f})]})}export{V as default};
