1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7429],{8227:function(e,t,a){(window.__NEXT_P=window.__NEXT_P||[]).push(["/app-settings/integrations/rackety",function(){return a(96902)}])},43868:function(e,t){"use strict";t.Z={src:"/_next/static/media/rackety.8d087a18.webp",height:101,width:766,blurDataURL:"data:image/webp;base64,UklGRlAAAABXRUJQVlA4WAoAAAAQAAAABwAAAAAAQUxQSAkAAAAAeFl2cndRT1gAVlA4ICAAAABwAQCdASoIAAEAAkA4JaQAAhpRwAD+3REUWtboCQAAAA==",blurWidth:8,blurHeight:1}},88601:function(e,t,a){"use strict";var r=a(85893),s=a(93967),i=a.n(s);a(67294),t.Z=e=>{let{buttonType:t="primary",buttonProps:a,children:s}=e,{className:d,...n}=a||{};return(0,r.jsx)("button",{...n,className:i()("transition-all duration-300 flex items-center gap-x-2 justify-center px-[18px]",{primary:"border border-transparent bg-successButton hover:bg-successPrimary text-white rounded-xl py-[10px] font-semibold text-balance shadow-xs disabled:bg-disabled disabled:cursor-not-allowed disabled:border-componentBg disabled:text-grayWarm400",secondary:"border border-borderPrimary bg-ButtonSecondary text-textSecondary rounded-xl py-[10px] font-semibold text-balance disabled:cursor-not-allowed disabled:text-grayWarm400",danger:"border border-errorPrimary bg-errorPrimary hover:bg-errorHover text-white rounded-xl py-[10px] font-semibold text-balance disabled:bg-disabled disabled:cursor-not-allowed disabled:border-componentBg disabled:text-grayWarm400",success:"border border-successButton bg-successButton text-white rounded-xl py-[10px] font-semibold text-balance disabled:bg-disabled disabled:cursor-not-allowed disabled:border-componentBg disabled:text-grayWarm400",transparent:"border border-transparent bg-transparent text-textSecondary rounded-xl py-[10px] font-semibold text-balance disabled:cursor-not-allowed disabled:text-grayWarm400",white:"border border-borderPrimary bg-[#FFFFFF] text-textSecondary rounded-xl py-[10px] font-semibold text-balance disabled:cursor-not-allowed disabled:text-grayWarm400"}[t],{[d]:d}),children:s})}},39671:function(e,t,a){"use strict";var r=a(85893),s=a(93967),i=a.n(s);a(67294),t.Z=e=>{let{title:t,subtitle:a,containerClassName:s,subtitleClassName:d}=e;return(0,r.jsxs)("div",{className:"flex flex-col gap-y-1 ".concat(s),children:[(0,r.jsx)("h2",{className:"text-[#101828] font-semibold text-[30px] leading-[38px]",children:t}),a&&(0,r.jsx)("span",{className:i()("text-[#667085] text-base font-normal leading-6 max-w-2xl ax",d),children:a})]})}},96902:function(e,t,a){"use strict";a.r(t),a.d(t,{default:function(){return P}});var r=a(85893),s=a(86658),i=a(87089),d=a(39671),n=a(56004),l=a(88601),o=a(87536),c=a(25675),u=a.n(c),b=a(43868),x=a(11163),p=a(44173),y=a(29204),m=a(53483),g=a(78551),A=a(30202),h=a(98029),f=a(20661);let v=async()=>(await m.x.get("/integrations/rackety/credentials")).data,k=async e=>(await m.x.post("/integrations/rackety/credentials",e)).data,w=()=>{let{data:e}=(0,f.DE)();return(0,g.a)({queryKey:["rackety-settings"],queryFn:v,enabled:!1===e})},j=()=>{let e=(0,A.NL)();return(0,h.D)({mutationFn:k,onSuccess:()=>{e.invalidateQueries({queryKey:["rackety-settings"]})}})};var N=a(67294);let R=()=>{var e,t;let a=(0,x.useRouter)(),{data:s}=w(),{mutateAsync:i}=j(),{register:c,handleSubmit:m,reset:g,formState:{errors:A,isDirty:h,isSubmitting:f}}=(0,o.cI)({defaultValues:{apiKey:"",clubId:""}});N.useEffect(()=>{s&&g({apiKey:s.racketyApiKey||"",clubId:s.racketyClubId||""})},[s,g]);let v=async e=>{try{await i({apiKey:e.apiKey,clubId:e.clubId||void 0}),p.Am.success("Rackety settings saved"),a.push("/app-settings/integrations")}catch(e){if(e instanceof y.d7){var t,r;p.Am.error((null===(r=e.response)||void 0===r?void 0:null===(t=r.data)||void 0===t?void 0:t.message)||"Failed to save Rackety settings")}else p.Am.error("Failed to save Rackety settings")}};return(0,r.jsxs)("div",{className:"border rounded-xl shadow-sm p-6",children:[(0,r.jsxs)("div",{className:"flex items-start gap-x-2",children:[(0,r.jsx)(u(),{src:b.Z,width:48,height:48,alt:"Rackety"}),(0,r.jsx)(d.Z,{title:"Rackety AI Video",subtitle:"Connect your Rackety account to record matches on camera-equipped courts and let members save and share their AI highlights."})]}),(0,r.jsxs)("form",{onSubmit:m(v),className:"mt-6",children:[(0,r.jsx)("div",{className:"grid grid-cols-1 lg:grid-cols-12 gap-6",children:(0,r.jsxs)("div",{className:"lg:col-span-7 flex flex-col gap-5",children:[(0,r.jsx)(n.Z,{labelText:"Rackety API Key",isRequired:!0,inputDescription:"Enter the API key from your Rackety account",inputProps:{placeholder:"sk_live_...",...c("apiKey",{required:"API key is required"})},errorText:null===(e=A.apiKey)||void 0===e?void 0:e.message}),(0,r.jsx)(n.Z,{labelText:"Club ID",inputDescription:"Optional: your Rackety club identifier",inputProps:{placeholder:"1234567890",...c("clubId")},errorText:null===(t=A.clubId)||void 0===t?void 0:t.message})]})}),(0,r.jsx)("div",{className:"border-b my-8"}),(0,r.jsxs)("div",{className:"flex justify-between items-center",children:[(0,r.jsx)("div",{className:"flex justify-start gap-3",children:(0,r.jsx)(l.Z,{buttonType:"secondary",buttonProps:{type:"button",className:"px-5",onClick:()=>a.back()},children:"Back"})}),(0,r.jsx)("div",{className:"flex justify-end gap-3",children:(0,r.jsx)(l.Z,{buttonProps:{type:"submit",className:"px-5",disabled:!h||f}
1,children:f?"Saving...":"Connect"})})]})]})]})};var I=a(66374);let _=()=>(0,r.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,r.jsx)(I.Z,{title:"Rackety",prevRoutes:[{title:"App settings"},{title:"Integrations",url:"/app-settings/integrations"}]}),(0,r.jsx)(R,{})]});_.getLayout=e=>(0,r.jsx)(s.Z,{className:"!py-0",children:(0,r.jsx)(i.Z,{children:e})});var P=_}},function(e){e.O(0,[7536,6658,7089,2888,9774,179],function(){return e(e.s=8227)}),_N_E=e.O()}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.