import { jsx, jsxs } from "react/jsx-runtime";
import { useRouterState, Outlet, Link } from "@tanstack/react-router";
import { FileSearch, Search, Send, AlertTriangle, Clock, X, ShieldCheck, ImageUp } from "lucide-react";
import { useState, useEffect, useMemo } from "react";
import { N as Navbar, F as Footer } from "./Navbar-CehhuAQz.js";
import { a as apiGet, r as resolveApiAssetUrl, b as apiPostForm } from "./router-Cfwp3IG7.js";
import "./useSiteSettings-7O51JHh5.js";
import "./client-Dz5aErML.js";
import "@supabase/supabase-js";
import "./logo-DIdLvJAL.js";
import "./ThemeToggle-FQS9vN6L.js";
function LaporPage() {
  const pathname = useRouterState({
    select: (state) => state.location.pathname
  });
  const [loading, setLoading] = useState(false);
  const [reportLoading, setReportLoading] = useState(true);
  const [success, setSuccess] = useState(null);
  const [error, setError] = useState("");
  const [reports, setReports] = useState([]);
  const [query, setQuery] = useState("");
  const [showReportForm, setShowReportForm] = useState(false);
  const [showThanksModal, setShowThanksModal] = useState(false);
  const loadReports = async (search = "") => {
    setReportLoading(true);
    const searchTerms = reportSearchTerms(search);
    const paths = searchTerms.length ? searchTerms.map((term) => `/reports/public?q=${encodeURIComponent(term)}`) : ["/reports/public"];
    try {
      const responses = await Promise.all(paths.map((path) => apiGet(path).catch(() => ({
        data: []
      }))));
      const mergedReports = /* @__PURE__ */ new Map();
      for (const report of responses.flatMap((response) => response.data ?? [])) {
        mergedReports.set(report.id, report);
      }
      setReports([...mergedReports.values()].filter((report) => report.status === "approved"));
    } catch {
      setReports([]);
    } finally {
      setReportLoading(false);
    }
  };
  useEffect(() => {
    void loadReports();
  }, []);
  const visibleReports = useMemo(() => [...reports].sort((a, b) => new Date(b.created_at ?? 0).getTime() - new Date(a.created_at ?? 0).getTime()), [reports]);
  const gameIdReports = useMemo(() => visibleReports.filter((report) => !!report.game_id), [visibleReports]);
  const whatsappReports = useMemo(() => visibleReports.filter((report) => !!report.reported_whatsapp), [visibleReports]);
  const problemReports = useMemo(() => visibleReports.filter((report) => !!report.game_id || !!report.reported_whatsapp), [visibleReports]);
  const handleSearch = (event) => {
    event.preventDefault();
    void loadReports(query);
  };
  const handleSubmit = async (event) => {
    event.preventDefault();
    setLoading(true);
    setError("");
    setSuccess(null);
    const formElement = event.currentTarget;
    const form = new FormData(formElement);
    const category = String(form.get("category") ?? "");
    const reporterWhatsapp = normalizeWhatsapp(form.get("reporter_whatsapp"));
    const reportedWhatsapp = normalizeWhatsapp(form.get("reported_whatsapp"));
    const reportedWhatsappRaw = String(form.get("reported_whatsapp") ?? "").trim();
    const images = form.getAll("evidence_images[]").filter((item) => item instanceof File && item.size > 0);
    if (!isValidWhatsapp(reporterWhatsapp, 10, 15)) {
      setLoading(false);
      setError("Nomor WhatsApp pelapor harus berisi 10-15 angka. Contoh: 6281234567890.");
      return;
    }
    if (category === "Pengguna Bermasalah" && !isValidWhatsapp(reportedWhatsapp, 8, 15)) {
      setLoading(false);
      setError("No WA Pelaku wajib diisi dengan 8-15 angka. Contoh: 6281234567890.");
      return;
    }
    if (reportedWhatsappRaw && !isValidWhatsapp(reportedWhatsapp, 8, 15)) {
      setLoading(false);
      setError("No WA Pelaku harus berisi 8-15 angka jika diisi.");
      return;
    }
    if (images.length > 10) {
      setLoading(false);
      setError("Maksimal upload 10 gambar bukti.");
      return;
    }
    form.set("reporter_whatsapp", reporterWhatsapp);
    if (reportedWhatsapp) {
      form.set("reported_whatsapp", reportedWhatsapp);
    } else {
      form.delete("reported_whatsapp");
    }
    try {
      const response = await apiPostForm("/reports", form);
      setSuccess(response);
      formElement.reset();
      setShowReportForm(false);
      setShowThanksModal(true);
      void loadReports(query);
    } catch (err) {
      setError(err instanceof Error ? err.message : "Laporan gagal dikirim.");
    } finally {
      setLoading(false);
    }
  };
  const openReportModal = () => {
    setError("");
    setSuccess(null);
    setShowReportForm(true);
  };
  if (pathname.startsWith("/lapor/")) {
    return /* @__PURE__ */ jsx(Outlet, {});
  }
  return /* @__PURE__ */ jsxs("div", { className: "page-shell", children: [
    /* @__PURE__ */ jsx(Navbar, {}),
    /* @__PURE__ */ jsx("main", { children: /* @__PURE__ */ jsx("section", { className: "section-shell lapor-page pt-28 md:pt-36", children: /* @__PURE__ */ jsxs("div", { className: "section-container", children: [
      /* @__PURE__ */ jsxs("div", { className: "lapor-hero max-w-3xl", children: [
        /* @__PURE__ */ jsxs("span", { className: "section-kicker", children: [
          /* @__PURE__ */ jsx(FileSearch, { className: "h-4 w-4" }),
          "Laporan Publik"
        ] }),
        /* @__PURE__ */ jsx("h1", { className: "section-title", children: "Cari laporan berdasarkan ID game atau nomor WA." }),
        /* @__PURE__ */ jsx("p", { className: "section-copy", children: "Daftar ini hanya menampilkan data laporan non-sensitif. Nama, email, dan WhatsApp pelapor tetap dilindungi dan hanya bisa dilihat admin." })
      ] }),
      /* @__PURE__ */ jsxs("form", { onSubmit: handleSearch, className: "lapor-search-form mt-6", children: [
        /* @__PURE__ */ jsxs("label", { className: "relative min-w-0 flex-1", children: [
          /* @__PURE__ */ jsx(Search, { className: "pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground" }),
          /* @__PURE__ */ jsx("input", { value: query, onChange: (event) => setQuery(event.target.value), className: "input lapor-search-input h-12 rounded-full pl-10", placeholder: "Cari ID game atau nomor WA pelaku..." })
        ] }),
        /* @__PURE__ */ jsxs("div", { className: "lapor-search-actions", children: [
          /* @__PURE__ */ jsx("button", { type: "submit", className: "btn-primary h-12 px-6", children: "Cari Laporan" }),
          /* @__PURE__ */ jsxs("button", { type: "button", onClick: openReportModal, className: "btn-secondary h-12 border-primary/25 bg-card/50 px-6", children: [
            /* @__PURE__ */ jsx(Send, { className: "h-4 w-4" }),
            "Buat Laporan"
          ] })
        ] })
      ] }),
      /* @__PURE__ */ jsxs("section", { className: "lapor-results-section mt-7", children: [
        /* @__PURE__ */ jsxs("div", { className: "lapor-list-header flex items-center justify-between gap-4", children: [
          /* @__PURE__ */ jsxs("div", { children: [
            /* @__PURE__ */ jsx("h2", { className: "font-display text-2xl font-bold text-foreground", children: "Data Bermasalah" }),
            /* @__PURE__ */ jsx("p", { className: "mt-1 text-sm text-muted-foreground", children: reportLoading ? "Memuat data laporan..." : `${gameIdReports.length} ID game dan ${whatsappReports.length} nomor WA ditemukan.` })
          ] }),
          /* @__PURE__ */ jsx("button", { type: "button", onClick: () => loadReports(query), disabled: reportLoading, className: "btn-secondary lapor-refresh h-11 px-4 disabled:cursor-wait disabled:opacity-70", children: reportLoading ? "Memuat..." : "Refresh" })
        ] }),
        /* @__PURE__ */ jsx("div", { className: "lapor-problem-wrap mt-4", children: /* @__PURE__ */ jsx(ProblemList, { title: "List Data Bermasalah", description: "Daftar ID game dan pengguna bermasalah dalam satu list.", icon: /* @__PURE__ */ jsx(AlertTriangle, { className: "h-4 w-4" }), loading: reportLoading, emptyText: "Belum ada data bermasalah yang cocok.", children: problemReports.map((report) => /* @__PURE__ */ jsx(ReportCard, { report }, `problem-${report.id}`)) }) })
      ] })
    ] }) }) }),
    /* @__PURE__ */ jsx(Footer, {}),
    showReportForm && /* @__PURE__ */ jsx(ReportModal, { loading, error, onClose: () => setShowReportForm(false), onSubmit: handleSubmit }),
    showThanksModal && success && /* @__PURE__ */ jsx(ThanksModal, { report: success, onClose: () => setShowThanksModal(false) })
  ] });
}
function ThanksModal({
  report,
  onClose
}) {
  return /* @__PURE__ */ jsx("div", { className: "fixed inset-0 z-[90] grid place-items-center overflow-auto bg-black/70 p-4 backdrop-blur-sm", children: /* @__PURE__ */ jsxs("div", { className: "card-surface w-full max-w-lg rounded-[2rem] p-6 text-center sm:p-8", children: [
    /* @__PURE__ */ jsx("div", { className: "mx-auto grid h-16 w-16 place-items-center rounded-full bg-primary/15 text-primary", children: /* @__PURE__ */ jsx(ShieldCheck, { className: "h-8 w-8" }) }),
    /* @__PURE__ */ jsx("h2", { className: "mt-5 font-display text-2xl font-bold text-foreground", children: "Terima kasih, laporan berhasil dikirim." }),
    /* @__PURE__ */ jsx("p", { className: "mt-3 text-sm leading-6 text-muted-foreground", children: "Laporan kamu sudah masuk ke sistem admin dan akan direview terlebih dahulu. Data pribadi pelapor tetap aman dan tidak akan tampil di halaman publik." }),
    /* @__PURE__ */ jsxs("div", { className: "mt-5 rounded-2xl border border-border bg-background/40 p-4 text-left text-sm", children: [
      /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-3", children: [
        /* @__PURE__ */ jsx("span", { className: "font-semibold text-muted-foreground", children: "ID Laporan" }),
        /* @__PURE__ */ jsxs("strong", { className: "font-display text-primary", children: [
          "#",
          report.data.id
        ] })
      ] }),
      /* @__PURE__ */ jsxs("div", { className: "mt-2 flex items-center justify-between gap-3", children: [
        /* @__PURE__ */ jsx("span", { className: "font-semibold text-muted-foreground", children: "Status" }),
        /* @__PURE__ */ jsx("strong", { className: "text-foreground", children: statusLabel(report.data.status) })
      ] })
    ] }),
    /* @__PURE__ */ jsx("p", { className: "mt-4 text-xs leading-5 text-muted-foreground", children: "Laporan baru akan tampil di daftar publik hanya setelah disetujui administrator." }),
    /* @__PURE__ */ jsx("button", { type: "button", onClick: onClose, className: "btn-primary mt-6 w-full", children: "Mengerti" })
  ] }) });
}
function ReportModal({
  loading,
  error,
  onClose,
  onSubmit
}) {
  const [category, setCategory] = useState("Pengguna Bermasalah");
  const [evidencePreviews, setEvidencePreviews] = useState([]);
  const [evidenceCount, setEvidenceCount] = useState(0);
  const isUserProblem = category === "Pengguna Bermasalah";
  useEffect(() => {
    return () => {
      evidencePreviews.forEach((url) => URL.revokeObjectURL(url));
    };
  }, [evidencePreviews]);
  const handleEvidenceChange = (event) => {
    const files = Array.from(event.target.files ?? []).filter((file) => file.type.startsWith("image/"));
    setEvidenceCount(files.length);
    setEvidencePreviews((current) => {
      current.forEach((url) => URL.revokeObjectURL(url));
      return files.slice(0, 10).map((file) => URL.createObjectURL(file));
    });
  };
  return /* @__PURE__ */ jsx("div", { className: "fixed inset-0 z-[80] grid place-items-center overflow-x-hidden overflow-y-auto bg-black/65 p-4 backdrop-blur-sm max-sm:items-start max-sm:p-3", children: /* @__PURE__ */ jsxs("form", { onSubmit, className: "card-surface report-form-modal relative w-full max-w-3xl rounded-[2rem] p-5 sm:p-7", children: [
    /* @__PURE__ */ jsx("button", { type: "button", onClick: onClose, "aria-label": "Tutup form laporan", className: "absolute right-4 top-4 grid h-10 w-10 place-items-center rounded-full border border-border bg-background/70 text-foreground", children: /* @__PURE__ */ jsx(X, { className: "h-5 w-5" }) }),
    /* @__PURE__ */ jsxs("div", { className: "pr-12", children: [
      /* @__PURE__ */ jsxs("span", { className: "section-kicker", children: [
        /* @__PURE__ */ jsx(ShieldCheck, { className: "h-4 w-4" }),
        "Fitur Pelapor"
      ] }),
      /* @__PURE__ */ jsx("h2", { className: "mt-4 font-display text-2xl font-bold text-foreground", children: "Kirim laporan baru." }),
      /* @__PURE__ */ jsx("p", { className: "mt-2 text-sm leading-6 text-muted-foreground", children: "Email dan nomor WhatsApp di bawah adalah data pelapor untuk kebutuhan verifikasi admin. Data ini tidak ditampilkan ke publik." })
    ] }),
    /* @__PURE__ */ jsxs("div", { className: "mt-5 grid gap-4 sm:grid-cols-2", children: [
      /* @__PURE__ */ jsx(Field, { label: "Nama (Panggilan)", children: /* @__PURE__ */ jsx("input", { name: "reporter_name", required: true, className: "input", placeholder: "Contoh: Pergam" }) }),
      /* @__PURE__ */ jsx(Field, { label: "Email Pelapor", children: /* @__PURE__ */ jsx("input", { name: "reporter_email", type: "email", required: true, className: "input", placeholder: "nama@email.com" }) }),
      /* @__PURE__ */ jsx(Field, { label: "Nomor WhatsApp Pelapor", children: /* @__PURE__ */ jsx("input", { name: "reporter_whatsapp", required: true, inputMode: "tel", className: "input", placeholder: "628xxxxxxxxxx" }) }),
      /* @__PURE__ */ jsxs("div", { className: "sm:col-span-2", children: [
        /* @__PURE__ */ jsx("span", { className: "mb-2 block text-xs font-bold uppercase tracking-wider text-muted-foreground", children: "Kategori" }),
        /* @__PURE__ */ jsx("input", { type: "hidden", name: "category", value: category }),
        /* @__PURE__ */ jsx("div", { className: "grid gap-2 sm:grid-cols-2", children: ["Pengguna Bermasalah", "ID Game Bermasalah"].map((item) => /* @__PURE__ */ jsx("button", { type: "button", onClick: () => setCategory(item), className: `rounded-2xl border px-4 py-3 text-left text-sm font-bold transition ${category === item ? "border-primary bg-primary text-primary-foreground shadow-glow-sm" : "border-border bg-background/45 text-foreground hover:border-primary/40 hover:bg-primary/10"}`, children: item }, item)) })
      ] }),
      !isUserProblem && /* @__PURE__ */ jsx(Field, { label: "ID Game Bermasalah", children: /* @__PURE__ */ jsx("input", { name: "game_id", className: "input", placeholder: "Contoh: 123456789", required: true }) }),
      /* @__PURE__ */ jsx(Field, { label: "No WA Pelaku", children: /* @__PURE__ */ jsx("input", { name: "reported_whatsapp", inputMode: "tel", className: "input", placeholder: "628xxxxxxxxxx", required: isUserProblem }) })
    ] }),
    /* @__PURE__ */ jsxs("div", { className: "mt-4 grid gap-4", children: [
      /* @__PURE__ */ jsx(Field, { label: "Judul Laporan", children: /* @__PURE__ */ jsx("input", { name: "title", required: true, className: "input", placeholder: "Ringkasan singkat laporan" }) }),
      /* @__PURE__ */ jsx(Field, { label: "Detail Laporan", children: /* @__PURE__ */ jsx("textarea", { name: "description", required: true, minLength: 20, rows: 5, className: "input resize-y", placeholder: "Jelaskan kronologi, pihak terkait, nominal jika ada, dan bukti pendukung." }) }),
      /* @__PURE__ */ jsx(Field, { label: "Bukti Upload Image (1-10 Gambar)", children: /* @__PURE__ */ jsxs("div", { className: "rounded-2xl border border-border bg-input p-4", children: [
        /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-3", children: [
          /* @__PURE__ */ jsx(ImageUp, { className: "mt-1 h-5 w-5 shrink-0 text-primary" }),
          /* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
            /* @__PURE__ */ jsx("input", { name: "evidence_images[]", type: "file", accept: "image/*", multiple: true, required: true, onChange: handleEvidenceChange, className: "w-full text-sm text-muted-foreground file:mr-3 file:rounded-full file:border-0 file:bg-primary file:px-4 file:py-2 file:text-sm file:font-bold file:text-primary-foreground" }),
            /* @__PURE__ */ jsx("p", { className: "mt-2 text-xs leading-5 text-muted-foreground", children: "Upload screenshot atau foto bukti. Maksimal 10 gambar, tiap gambar maksimal 4MB." }),
            evidenceCount > 0 && /* @__PURE__ */ jsx("p", { className: `mt-2 text-xs font-bold ${evidenceCount > 10 ? "text-destructive" : "text-primary"}`, children: evidenceCount > 10 ? `Dipilih ${evidenceCount} gambar. Maksimal hanya 10 gambar.` : `${evidenceCount} gambar bukti dipilih.` })
          ] })
        ] }),
        evidencePreviews.length > 0 && /* @__PURE__ */ jsx("div", { className: "mt-4 grid grid-cols-3 gap-2 sm:grid-cols-5", children: evidencePreviews.map((src, index) => /* @__PURE__ */ jsxs("figure", { className: "group relative aspect-square overflow-hidden rounded-xl border border-border bg-background/60", children: [
          /* @__PURE__ */ jsx("img", { src, alt: `Preview bukti ${index + 1}`, className: "h-full w-full object-cover transition group-hover:scale-105" }),
          /* @__PURE__ */ jsx("figcaption", { className: "absolute bottom-1 left-1 rounded-full bg-black/65 px-2 py-0.5 text-[10px] font-bold text-white", children: index + 1 })
        ] }, src)) })
      ] }) })
    ] }),
    /* @__PURE__ */ jsxs("div", { className: "mt-4 rounded-2xl border border-primary/20 bg-primary/10 p-4 text-sm leading-6 text-muted-foreground", children: [
      /* @__PURE__ */ jsx(AlertTriangle, { className: "mr-2 inline h-4 w-4 text-primary" }),
      "Email dan WhatsApp pelapor hanya digunakan untuk verifikasi, permintaan bukti tambahan, proses banding/sengketa, dan komunikasi admin."
    ] }),
    error && /* @__PURE__ */ jsx("div", { className: "mt-4 rounded-2xl border border-destructive/30 bg-destructive/10 px-4 py-3 text-sm text-destructive", children: error }),
    /* @__PURE__ */ jsxs("button", { type: "submit", disabled: loading, className: "btn-primary mt-5 w-full", children: [
      /* @__PURE__ */ jsx(Send, { className: "h-4 w-4" }),
      loading ? "Mengirim..." : "Kirim Laporan"
    ] })
  ] }) });
}
function Field({
  label,
  children
}) {
  return /* @__PURE__ */ jsxs("label", { className: "block", children: [
    /* @__PURE__ */ jsx("span", { className: "mb-1 block text-xs font-bold uppercase tracking-wider text-muted-foreground", children: label }),
    children
  ] });
}
function normalizeWhatsapp(value) {
  const digits = String(value ?? "").replace(/\D/g, "");
  if (digits.startsWith("0")) {
    return `62${digits.slice(1)}`;
  }
  if (digits.startsWith("8")) {
    return `62${digits}`;
  }
  return digits;
}
function reportSearchTerms(value) {
  const clean = value.trim();
  if (!clean) return [];
  const digits = clean.replace(/\D/g, "");
  const compact = clean.replace(/[\s().-]/g, "");
  const looksLikeWhatsapp = digits.length >= 8 && (compact.startsWith("+62") || compact.startsWith("62") || compact.startsWith("0") || compact.startsWith("8") || /[+\s().-]/.test(clean));
  if (!looksLikeWhatsapp) return [clean];
  return Array.from(new Set([clean, normalizeWhatsapp(clean)].filter(Boolean)));
}
function isValidWhatsapp(value, minLength, maxLength) {
  return value.length >= minLength && value.length <= maxLength;
}
function ProblemList({
  title,
  description,
  icon,
  loading,
  emptyText,
  children
}) {
  const items = Array.isArray(children) ? children.filter(Boolean) : children ? [children] : [];
  return /* @__PURE__ */ jsxs("div", { children: [
    /* @__PURE__ */ jsxs("div", { className: "mb-3", children: [
      /* @__PURE__ */ jsxs("h3", { className: "flex items-center gap-2 font-display text-xl font-bold text-foreground", children: [
        /* @__PURE__ */ jsx("span", { className: "grid h-8 w-8 place-items-center rounded-full border border-primary/25 bg-primary/10 text-primary", children: icon }),
        title
      ] }),
      /* @__PURE__ */ jsx("p", { className: "mt-1 text-sm leading-6 text-muted-foreground", children: description })
    ] }),
    /* @__PURE__ */ jsx("div", { className: "grid gap-3", children: loading ? [1, 2, 3].map((item) => /* @__PURE__ */ jsx("div", { className: "h-32 animate-pulse rounded-[1.25rem] border border-border bg-card/50" }, item)) : items.length === 0 ? /* @__PURE__ */ jsx("div", { className: "rounded-[1.25rem] border border-border bg-card/45 p-6 text-center text-sm font-semibold text-muted-foreground", children: emptyText }) : children })
  ] });
}
function ReportCard({
  report
}) {
  const evidenceImage = resolveApiAssetUrl(report.evidence_images?.[0]);
  return /* @__PURE__ */ jsxs(Link, { to: "/lapor/$reportId", params: {
    reportId: String(report.id)
  }, "aria-label": `Buka detail laporan ${report.id}`, className: "card-surface lapor-report-card grid w-full gap-4 rounded-[1.25rem] p-4 text-left transition hover:-translate-y-0.5 hover:border-primary/35 hover:shadow-glow md:grid-cols-[150px_minmax(0,1fr)]", children: [
    /* @__PURE__ */ jsxs("div", { className: "lapor-report-media relative aspect-[4/3] overflow-hidden rounded-2xl border border-border bg-muted", children: [
      evidenceImage ? /* @__PURE__ */ jsx("img", { src: evidenceImage, alt: `Bukti laporan ${report.id}`, className: "h-full w-full scale-105 object-cover opacity-70 blur-[3px]", loading: "lazy" }) : /* @__PURE__ */ jsx("div", { className: "grid h-full w-full place-items-center bg-background/45 text-xs font-bold text-muted-foreground", children: "Tidak ada bukti" }),
      /* @__PURE__ */ jsx("div", { className: "absolute inset-0 bg-background/20" }),
      /* @__PURE__ */ jsx("img", { src: "/cap.png", alt: "", "aria-hidden": "true", className: "absolute left-1/2 top-1/2 w-24 max-w-[72%] -translate-x-1/2 -translate-y-1/2 object-contain drop-shadow-lg" })
    ] }),
    /* @__PURE__ */ jsxs("div", { className: "lapor-report-body min-w-0", children: [
      /* @__PURE__ */ jsxs("div", { className: "lapor-report-data flex flex-wrap gap-x-4 gap-y-1 rounded-2xl border border-border bg-background/35 p-3 text-xs", children: [
        report.game_id && /* @__PURE__ */ jsxs("span", { className: "text-muted-foreground", children: [
          "ID Game: ",
          /* @__PURE__ */ jsx("strong", { className: "text-foreground", children: report.game_id })
        ] }),
        report.reported_whatsapp && /* @__PURE__ */ jsxs("span", { className: "text-muted-foreground", children: [
          "No WA Pelaku:",
          " ",
          /* @__PURE__ */ jsx("strong", { className: "text-foreground", children: report.reported_whatsapp })
        ] })
      ] }),
      /* @__PURE__ */ jsx("div", { className: "lapor-report-footer mt-3 flex flex-wrap items-center gap-3 text-xs font-semibold text-muted-foreground", children: /* @__PURE__ */ jsxs("span", { className: "inline-flex items-center gap-1.5", children: [
        /* @__PURE__ */ jsx(Clock, { className: "h-3.5 w-3.5 text-primary" }),
        report.created_at ? new Date(report.created_at).toLocaleString("id-ID") : "Baru"
      ] }) })
    ] })
  ] });
}
function statusLabel(status) {
  if (status === "approved") return "Disetujui";
  if (status === "rejected") return "Ditolak";
  return "Pending";
}
export {
  LaporPage as component
};
