1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4489],{80615:(e,t,r)=>{r.d(t,{Vo:()=>g,sO:()=>c});var a=r(99776),s=r(80549),i=r(26436),l=r(29523),n=r(1026),o=r(18720),d=r(2479);function u(){let{user:e}=(0,i.Km)(),t=(0,l.cT)();return(0,a.useQueryClient)(),(0,s.useMutation)({mutationFn:r=>{if(!t)throw Error("Supabase client not ready");if(!(null==e?void 0:e.id))throw Error("User not authenticated");return(0,n.LU)(t,e.id,r)},onSuccess:(e,t)=>{o.oR.success("Report submitted successfully")},onError:e=>{d.A.error("Error creating report:",e),o.oR.error("Failed to submit report. Please try again.")}})}function c(){let e=u();return{flagListing:(t,r,a)=>{let s=r.join(", ");return e.mutate({target_type:"listing",target_id:t,reason_category:s,description:a,metadata:{reasons:r,flagged_at:new Date().toISOString()}})},isLoading:e.isPending,error:e.error}}function g(){let e=u();return{flagUser:(t,r,a)=>{let s=r.join(", ");return e.mutate({target_type:"user",target_id:t,reason_category:s,description:a,metadata:{reasons:r,flagged_at:new Date().toISOString()}})},isLoading:e.isPending,error:e.error}}},94489:(e,t,r)=>{r.r(t),r.d(t,{default:()=>o});var a=r(95155),s=r(12115),i=r(65229),l=r(80615);let n=["Fake Listing Images","Fake Profile Image","Dishonest Behavior","Impersonated Roomi Employee","Attempted Scam for Money","Harassment or Overly Aggressive","Other"];function o(e){let{isOpen:t,onClose:r,listingId:o,onSubmit:d}=e,[u,c]=(0,s.useState)([]),{flagListing:g,isLoading:m}=(0,l.sO)(),x=(0,s.useMemo)(()=>u.length>0,[u]),f=async()=>{if(x&&!m)try{g(o,u),await (null==d?void 0:d(u))}finally{c([]),r()}};return t?(0,a.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50",children:(0,a.jsxs)("div",{className:"mx-4 w-full max-w-md rounded-2xl bg-white shadow-xl",children:[(0,a.jsxs)("div",{className:"flex items-start justify-between border-b px-6 py-4",children:[(0,a.jsx)("div",{children:(0,a.jsx)("h2",{className:"text-2xl font-bold text-black",children:"Flag info"})}),(0,a.jsx)("button",{onClick:r,className:"rounded-full p-1 text-gray-400 hover:bg-gray-100 hover:text-gray-600","aria-label":"Close flag modal",children:(0,a.jsx)(i.A,{className:"h-6 w-6"})})]}),(0,a.jsx)("div",{className:"text-muted-foreground px-6 py-4 text-sm",children:"Select all that apply:"}),(0,a.jsx)("div",{className:"flex flex-wrap gap-3 px-6 pb-4",children:n.map(e=>{let t=u.includes(e);return(0,a.jsx)("button",{onClick:()=>{c(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},className:"rounded-full border px-2 py-1 text-sm font-medium transition-colors "+(t?"border-roomi-destructive bg-blue-50":"border-gray-200 bg-white text-gray-700 hover:bg-gray-50"),"aria-pressed":t,children:e},e)})}),(0,a.jsx)("div",{className:"flex justify-center px-6 py-4",children:(0,a.jsx)("button",{onClick:f,disabled:!x||m,className:"w-full rounded-md py-2 text-base font-medium text-white transition-all ".concat(x&&!m?"bg-roomi-destructive duration-300 hover:opacity-50":"cursor-not-allowed bg-gray-200 text-gray-400"),children:"SUBMIT"})})]})}):null}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.