import{R as n,d,r as c,j as e,L as m}from"./index-BMcVAjQW.js";import{N as x,b as p,F as u}from"./Navbar-BDyyZAYc.js";import{A as g}from"./arrow-left-B2H7_Afe.js";import{c as h}from"./createLucideIcon-7qXzago0.js";import{S as f}from"./shield-check-DO8Zc_vn.js";import{C as b}from"./clock-BURmmhoD.js";import{I as j}from"./image-up-D-KJZh9a.js";import{X as N}from"./x-DwrvlHRD.js";import"./useSiteSettings-GEm0exaR.js";import"./client-BVfsVemL.js";import"./logo-XDEmBYwz.js";import"./ThemeToggle-CFjBkjyW.js";import"./shield-alert-DaU1dui7.js";const v=[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]],y=h("hash",v);function F(){const a=n.useLoaderData(),s=(a.evidence_images??[]).map(d).filter(Boolean),[r,o]=c.useState(null);return e.jsxs("div",{className:"page-shell",children:[e.jsx(x,{}),e.jsx("main",{className:"section-shell pt-28 md:pt-36",children:e.jsxs("div",{className:"section-container",children:[e.jsxs(m,{to:"/lapor",className:"mb-6 inline-flex items-center gap-2 text-sm font-bold text-muted-foreground transition hover:text-foreground",children:[e.jsx(g,{className:"h-4 w-4"}),"Kembali ke laporan"]}),e.jsxs("section",{className:"grid gap-6 lg:grid-cols-[minmax(0,0.85fr)_minmax(0,1fr)]",children:[e.jsx("aside",{className:"grid gap-4",children:e.jsxs("div",{className:"card-surface rounded-[1.75rem] p-5",children:[e.jsx("div",{className:"flex flex-wrap items-center gap-2",children:e.jsx("span",{className:`status-pill status-pill--${a.status}`,children:k(a.status)})}),e.jsxs("h1",{className:"mt-4 font-display text-3xl font-bold leading-tight text-foreground",children:["#",a.id," ",a.title]}),e.jsx("p",{className:"mt-2 text-sm font-semibold text-primary",children:a.category}),e.jsxs("div",{className:"mt-5 grid gap-3",children:[e.jsx(l,{icon:e.jsx(y,{className:"h-4 w-4"}),label:"ID Game Bermasalah",value:a.game_id||"-"}),e.jsx(l,{icon:e.jsx(p,{className:"h-4 w-4"}),label:"No WA Pelaku",value:a.reported_whatsapp||"-"}),e.jsx(l,{icon:e.jsx(f,{className:"h-4 w-4"}),label:"Kredibilitas Pelapor",value:a.reporter?.credibility??"Pelapor Baru"}),e.jsx(l,{icon:e.jsx(b,{className:"h-4 w-4"}),label:"Tanggal Laporan",value:a.created_at?new Date(a.created_at).toLocaleString("id-ID"):"Baru"})]})]})}),e.jsxs("article",{className:"card-surface rounded-[1.75rem] p-5 sm:p-7",children:[e.jsx("h2",{className:"font-display text-xl font-bold text-foreground",children:"Keterangan"}),e.jsx("p",{className:"mt-3 whitespace-pre-wrap text-sm leading-7 text-muted-foreground",children:a.description}),e.jsxs("div",{className:"mt-7",children:[e.jsxs("h2",{className:"flex items-center gap-2 font-display text-xl font-bold text-foreground",children:[e.jsx(j,{className:"h-5 w-5 text-primary"}),"Foto Bukti"]}),s.length===0?e.jsx("div",{className:"mt-3 rounded-2xl border border-border bg-card/45 p-6 text-center text-sm font-semibold text-muted-foreground",children:"Belum ada foto bukti publik."}):e.jsx("div",{className:"mt-3 grid grid-cols-2 gap-3 sm:grid-cols-3",children:s.slice(0,10).map((t,i)=>e.jsx("button",{type:"button",onClick:()=>o({src:t,alt:`Bukti laporan ${i+1}`}),className:"group overflow-hidden rounded-2xl border border-border bg-muted text-left",children:e.jsx("img",{src:t,alt:`Bukti laporan ${i+1}`,className:"aspect-square h-full w-full object-cover transition group-hover:scale-105",loading:"lazy"})},`${t}-${i}`))})]})]})]})]})}),r&&e.jsxs("div",{className:"fixed inset-0 z-[90] grid place-items-center bg-background/86 p-4 backdrop-blur-xl animate-fade-up",onClick:()=>o(null),role:"dialog","aria-modal":"true","aria-label":"Pratinjau foto bukti",children:[e.jsx("button",{type:"button",onClick:()=>o(null),className:"group absolute right-4 top-4 z-10 grid h-11 w-11 place-items-center rounded-full border border-border bg-card shadow-card transition hover:bg-primary/15","aria-label":"Tutup foto bukti",children:e.jsx(N,{className:"h-5 w-5 opacity-80 transition-transform group-hover:rotate-90"})}),e.jsx("div",{className:"max-h-[90vh] max-w-4xl overflow-auto rounded-3xl shadow-card",onClick:t=>t.stopPropagation(),children:e.jsx("img",{src:r.src,alt:r.alt,className:"block h-auto w-full"})})]}),e.jsx(u,{})]})}function l({icon:a,label:s,value:r}){return e.jsxs("div",{className:"rounded-2xl border border-border bg-background/35 p-4",children:[e.jsxs("div",{className:"flex items-center gap-2 text-xs font-bold uppercase text-muted-foreground",children:[e.jsx("span",{className:"text-primary",children:a}),s]}),e.jsx("div",{className:"mt-1 break-words font-display text-lg font-bold text-foreground",children:r})]})}function k(a){return a==="approved"?"Disetujui":a==="rejected"?"Ditolak":"Pending"}export{F as component};
