import{i as t,a2 as B,M as N,P as O,n as D,a4 as P,a7 as I}from"./app-JmgyQoR0.js";import{M as T}from"./MkPagination-urywMrXv.js";import{M as H}from"./MkKeyValue-qNXtpS4q.js";import{b as R,a as m,D as u,g as z,h as _,t as $,u as e,q as E,i as y,j as a,l,K as i,E as o,z as s,H as C,I as F,J as K,c as S,G as L,F as j}from"./vue-y3KLWBaS.js";const q=v=>(F("data-v-72a27dcd"),v=v(),K(),v),G={class:"bcekxzvu _gap _panel"},J={class:"target"},W={class:"names"},X={class:"detail"},x=q(()=>e("hr",null,null,-1)),Q={key:0},Y={class:"action"},Z=R({__name:"MkAbuseReport",props:{report:{}},emits:["resolved"],setup(v,{emit:k}){const c=v,f=k,p=m(c.report.forwarded);function V(){O("admin/resolve-abuse-user-report",{forward:p.value,reportId:c.report.id}).then(()=>{f("resolved",c.report.id)})}return(r,g)=>{const U=u("MkAvatar"),h=u("MkUserName"),n=u("MkAcct"),w=u("MkA"),M=u("MkTime"),A=u("Mfm"),d=z("user-preview");return _(),$("div",G,[e("div",J,[E((_(),y(w,{class:"info",to:`/user-info/${r.report.targetUserId}`},{default:a(()=>[l(U,{class:"avatar",user:r.report.targetUser,"show-indicator":!0,"disable-link":!0},null,8,["user"]),e("div",W,[l(h,{class:"name",user:r.report.targetUser},null,8,["user"]),l(n,{class:"acct",user:r.report.targetUser,style:{display:"block"}},null,8,["user"])])]),_:1},8,["to"])),[[d,r.report.targetUserId]]),l(H,{class:"_formBlock"},{key:a(()=>[i(o(s(t).ts.registeredDate),1)]),value:a(()=>[i(o(new Date(r.report.targetUser.createdAt).toLocaleString())+" (",1),l(M,{time:r.report.targetUser.createdAt},null,8,["time"]),i(")")]),_:1})]),e("div",X,[e("div",null,[l(A,{text:r.report.comment},null,8,["text"])]),x,e("div",null,[i(o(s(t).ts.reporter)+": ",1),l(n,{user:r.report.reporter},null,8,["user"])]),r.report.assignee?(_(),$("div",Q,[i(o(s(t).ts.moderator)+": ",1),l(n,{user:r.report.assignee},null,8,["user"])])):C("",!0),e("div",null,[l(M,{time:r.report.createdAt},null,8,["time"])]),e("div",Y,[l(B,{modelValue:p.value,"onUpdate:modelValue":g[0]||(g[0]=b=>p.value=b),disabled:r.report.targetUser.host==null||r.report.resolved},{caption:a(()=>[i(o(s(t).ts.forwardReportIsAnonymous),1)]),default:a(()=>[i(o(s(t).ts.forwardReport)+" ",1)]),_:1},8,["modelValue","disabled"]),r.report.resolved?C("",!0):(_(),y(N,{key:0,primary:"",onClick:V},{default:a(()=>[i(o(s(t).ts.abuseMarkAsResolved),1)]),_:1}))])])])}}}),ee=D(Z,[["__scopeId","data-v-72a27dcd"]]),te={class:"lcixvhis"},oe={class:"_section reports"},se={class:"_content"},re={class:"inputs",style:{display:"flex"}},ae={value:"all"},le={value:"unresolved"},ne={value:"resolved"},ie={value:"combined"},de={value:"local"},ue={value:"remote"},ce={value:"combined"},pe={value:"local"},me={value:"remote"},_e=R({__name:"abuses",setup(v){let k=m(),c=m("unresolved"),f=m("combined"),p=m("combined");m(""),m("");const V={endpoint:"admin/abuse-user-reports",limit:10,params:S(()=>({state:c.value,reporterOrigin:f.value,targetUserOrigin:p.value}))};function r(h){k.value.removeItem(n=>n.id===h)}const g=S(()=>[]),U=S(()=>[]);return P({title:t.ts.abuseReports,icon:"ph-warning-circle ph-bold ph-lg"}),(h,n)=>{const w=u("MkPageHeader"),M=u("MkSpacer"),A=u("MkStickyContainer");return _(),y(A,null,{header:a(()=>[l(w,{actions:g.value,tabs:U.value,"display-back-button":!0},null,8,["actions","tabs"])]),default:a(()=>[l(M,{"content-max":900},{default:a(()=>[e("div",te,[e("div",oe,[e("div",se,[e("div",re,[l(I,{modelValue:c.value,"onUpdate:modelValue":n[0]||(n[0]=d=>c.value=d),style:{margin:"0",flex:"1"}},{label:a(()=>[i(o(s(t).ts.state),1)]),default:a(()=>[e("option",ae,o(s(t).ts.all),1),e("option",le,o(s(t).ts.unresolved),1),e("option",ne,o(s(t).ts.resolved),1)]),_:1},8,["modelValue"]),l(I,{modelValue:p.value,"onUpdate:modelValue":n[1]||(n[1]=d=>p.value=d),style:{margin:"0",flex:"1"}},{label:a(()=>[i(o(s(t).ts.reporteeOrigin),1)]),default:a(()=>[e("option",ie,o(s(t).ts.all),1),e("option",de,o(s(t).ts.local),1),e("option",ue,o(s(t).ts.remote),1)]),_:1},8,["modelValue"]),l(I,{modelValue:f.value,"onUpdate:modelValue":n[2]||(n[2]=d=>f.value=d),style:{margin:"0",flex:"1"}},{label:a(()=>[i(o(s(t).ts.reporterOrigin),1)]),default:a(()=>[e("option",ce,o(s(t).ts.all),1),e("option",pe,o(s(t).ts.local),1),e("option",me,o(s(t).ts.remote),1)]),_:1},8,["modelValue"])]),l(T,{ref_key:"reports",ref:k,pagination:V,style:{"margin-top":"var(--margin)"}},{default:a(({items:d})=>[(_(!0),$(j,null,L(d,b=>(_(),y(ee,{key:b.id,report:b,onResolved:r},null,8,["report"]))),128))]),_:1},512)])])])]),_:1})]),_:1})}}}),he=D(_e,[["__scopeId","data-v-e0082042"]]);export{he as default};
