import{o as e}from"./rolldown-runtime-iuO8RvI4.js";import{Tu as t,zm as s}from"./shared-0-C4kdVF7Y.js";import{Mi as r,ki as a}from"./vendor-frame-CwiylG4Y.js";import{Qf as o,Rf as i}from"./shared-1-3-6x7RKF.js";import{nn as n}from"./vendor-all-2-BJdkbLSj.js";import{o as l}from"./shared-13-Uoqh3mCb.js";var m=a(),d=({onClose:e})=>(0,m.jsxs)("div",{className:"bg-bg-400 flex h-full flex-col items-center justify-center gap-4",children:[(0,m.jsx)("h3",{className:"font-ui-serif text-text-100 max-w-xl text-center text-[1.75rem]",children:(0,m.jsx)(n,{defaultMessage:"Artifact reported",id:"kcb2pY5IsN"})}),(0,m.jsx)("p",{className:"text-text-300 max-w-xl text-center",children:(0,m.jsx)(n,{defaultMessage:"Thank you for reporting the Artifact. We take these matters seriously and will investigate the issue. Your report helps us maintain the integrity of our platform.",id:"krgcu80Qe5"})}),(0,m.jsx)(o,{onClick:e,variant:"primary",className:"mt-3",size:"lg",children:(0,m.jsx)(n,{defaultMessage:"Show Content",id:"HrYfy0gEA+"})})]}),p=e(r()),u=({isOpen:e,onClose:r,publishedArtifactUuid:a})=>{const[o,d]=(0,p.useState)(),[u,f]=(0,p.useState)(),[c,x]=(0,p.useState)(),[h,g]=(0,p.useState)(),[j,v]=(0,p.useState)(!1),y=t(),{mutateAsync:S}=s(`/api/published_artifacts/${b=a??void 0}/report`,"POST",{enabled:!!b});var b;return(0,m.jsx)(i,{modalSize:"md",isOpen:e,onClose:r,hasCloseButton:!0,title:(0,m.jsx)("span",{className:"font-claude-response font-medium",children:(0,m.jsx)(n,{defaultMessage:"Report Artifact",id:"9W9AYgC9Qk"})}),children:(0,m.jsx)(l,{category:o,setCategory:d,notes:u,setNotes:f,reporterEmail:c,setReporterEmail:x,reporterName:h,setReporterName:g,optOutOfTraining:j,setOptOutOfTraining:v,onSubmit:async()=>{await S({notes:u,category:o,reporter_name:h,reporter_email:c,opt_out_of_training:j}),d(void 0),f(void 0),g(void 0),x(void 0),v(!1),r(!0)},onAfterSubmit:()=>y.push("/reported"),onClose:()=>r(!1)})})};export{d as n,u as t};