import{o as e}from"./rolldown-runtime-iuO8RvI4.js";import{Tu as o,zm as t}from"./shared-0-C4kdVF7Y.js";import{Mi as r,ki as s}from"./vendor-frame-CwiylG4Y.js";import{Ch as a,Rf as n}from"./shared-1-3-6x7RKF.js";import{nn as i}from"./vendor-all-2-BJdkbLSj.js";import{o as m}from"./shared-13-Uoqh3mCb.js";var p=e(r()),d=s();function u({isOpen:e,onClose:r,shareId:s,organizationUuid:u}){const l=o(),[f,c]=(0,p.useState)(),[h,j]=(0,p.useState)(),[g,S]=(0,p.useState)(),[v,O]=(0,p.useState)(),[C,x]=(0,p.useState)(!1),{mutateAsync:y}=function(e,o){return t(`/api/organizations/${e}/code/shares/${void 0===o?o:a(o)}/report`,"POST",{enabled:!!o&&!!e})}(u,s);return(0,d.jsx)(n,{modalSize:"md",isOpen:e,onClose:r,hasCloseButton:!0,title:(0,d.jsx)("span",{className:"font-claude-response font-medium",children:(0,d.jsx)(i,{defaultMessage:"Report session",id:"Nk3r7n0fmm"})}),children:(0,d.jsx)(m,{category:f,setCategory:c,notes:h,setNotes:j,reporterEmail:g,setReporterEmail:S,reporterName:v,setReporterName:O,optOutOfTraining:C,setOptOutOfTraining:x,onSubmit:async()=>{await y({notes:h,category:f,reporter_name:v,reporter_email:g,opt_out_of_training:C}),c(void 0),j(void 0),O(void 0),S(void 0),x(!1),r(!0)},onAfterSubmit:()=>l.push("/reported"),onClose:()=>r(!1)})})}export{u as CodeShareReportModal};