PageSourceSearch

https://app.feedguardians.com/build/assets/ConversationsList-CmK5m-f2.js

js feedguardians.com collected 2026-10-05 03:51:12 UTC 21,294 bytes, 6 lines download raw bytes

1import{r as l,j as e,S as F}from"./app-Df0WhE88.js";import{V as d}from"./index-CbyX_FG2.js";import{u as Ee}from"./hook-cUpn6jmJ.js";import{B as D}from"./button-DODpbI6z.js";import{B as ce}from"./badge-D5t8ozEx.js";import{A as Pe,b as ze,a as Re}from"./avatar-CSb-oTsq.js";import{C as de}from"./checkbox-DPJ2WnZg.js";import{D as Ue,a as Ve,b as $e,c as Xe}from"./dropdown-menu-CBMGP22a.js";import{I as me}from"./input-B2XlIU3R.js";import{S as P,a as z,b as R,c as U,d as u}from"./select-r-CWAnae.js";import{a as b,b as v,c as w}from"./tooltip-BqsoLRzz.js";import{C as Ke}from"./country-grouped-channel-selector-C-4Focux.js";import{g as _,c as S}from"./utils-BLilNKz0.js";import{u as Ge}from"./use-initials-iwWEVMjE.js";import{u as qe}from"./use-infinite-scroll-6wo4exG_.js";import{M as he}from"./message-circle-BlulTnfr.js";import{S as Je}from"./search-Da-UG91x.js";import{L as f}from"./loader-circle-mCr8eQnM.js";import{X as ue}from"./x-DQhsh6G6.js";import{R as Ye}from"./refresh-cw-rucIZS4-.js";import{A as Ze}from"./arrow-up-down-D3iC2nP8.js";import{L as xe}from"./languages-2305zPyL.js";import{A as He}from"./index-DW6ehqGg.js";import{m as Qe}from"./proxy-A0bqQU1M.js";import{A as ge}from"./archive-BBXxFsKn.js";import{c as We}from"./createLucideIcon-D8IOfx66.js";import{G as es}from"./globe-C5yVm-LK.js";import{S as ss}from"./star-CXWwtlBT.js";import{S as as}from"./sticky-note-BXDVhuTH.js";import{B as ts}from"./bot-off-BAybjPgL.js";/* empty css            */import"./index-f9eEkPeC.js";import"./index-C_aQ5Fse.js";import"./index-CUCnQF9z.js";import"./index-DoroMbP7.js";import"./index-Bl8pCzFU.js";import"./index-BrlCwTuh.js";import"./check-DKDT4iB2.js";import"./index-sv0hUu_U.js";import"./index-CYo-1zw7.js";import"./floating-ui.react-dom-itVd6ZF4.js";import"./index-Dc2Xp5Em.js";import"./index-m6jE-OsQ.js";import"./chevron-right-C-DCAJHN.js";import"./index-TWrWGawf.js";import"./chevron-down-kKTPs013.js";import"./chevron-up-DoOIDAWi.js";import"./index-DSrTWo_E.js";/**
2 * @license lucide-react v0.475.0 - ISC
3 *
4 * This source code is licensed under the ISC license.
5 * See the LICENSE file in the root directory of this source tree.
6 */const rs=[["path",{d:"M21.2 8.4c.5.38.8.97.8 1.6v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V10a2 2 0 0 1 .8-1.6l8-6a2 2 0 0 1 2.4 0l8 6Z",key:"1jhwl8"}],["path",{d:"m22 10-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 10",key:"1qfld7"}]],ns=We("MailOpen",rs);function ea({conversations:T,paginationMeta:x,selectedConversation:h,onConversationSelect:pe,onConversationHover:I,connectedChannels:V,filters:t,availableLanguages:g=[],onFilterChange:j,onRefresh:$,isRefreshing:X=!1,isLoading:fe=!1,isFiltering:K=!1}){const{t:a,currentLocale:G}=Ee(),N=l.useMemo(()=>new Intl.DisplayNames([G()],{type:"language"}),[G]),je=Ge(),[L,q]=l.useState(t.search||""),[B,J]=l.useState(""),De=l.useMemo(()=>B?g.filter(s=>`${N.of(s)??""} ${s}`.toLowerCase().includes(B.toLowerCase())):g,[g,B,N]),[c,O]=l.useState(new Set),[Y,Z]=l.useState(!1),[H,Q]=l.useState(!1),[W,ee]=l.useState(!1),[se,ae]=l.useState(!1),k=l.useRef(null),[m,te]=l.useState(T||[]),[A,re]=l.useState(!1),[y,ne]=l.useState(!1),[M,oe]=l.useState(null),be=Array.isArray(t.channel)?t.channel:t.channel?[t.channel]:[],ve=V.map(s=>({value:s.id.toString(),label:s.platform_page_name,icon:s.platform==="facebook"?e.jsx("img",{src:"/images/fb-logo.svg",alt:"Facebook",className:"h-4 w-4"}):s.platform==="instagram"?e.jsx("img",{src:"/images/insta-logo.svg",alt:"Instagram",className:"h-4 w-4"}):s.platform==="x"?e.jsx("img",{src:"/images/x-logo.svg",alt:"X",className:"h-4 w-4"}):s.platform==="tiktok"?e.jsx("img",{src:"/images/tiktok-logo.svg",alt:"TikTok",className:"h-4 w-4"}):e.jsx(he,{className:"w-4 h-4 text-[#2D1B3D]/60"}),badge:s.unread_count,country:s.country})),we=s=>{j("channel",s)},Ne=s=>{O(n=>{const r=new Set(n);return r.has(s)?r.delete(s):r.add(s),r})},ye=()=>{E?p():O(new Set(m.map(s=>s.conversation_id)))},p=()=>{O(new Set)},Ce=async()=>{if(c.size!==0){Z(!0);try{const s=await fetch(route("inbox.messages.mark-unread"),{method:"POST",headers:{"Content-Type":"application/json","X-CSRF-TOKEN":_()},body:JSON.stringify({conversation_ids:Array.from(c)})});if(s.ok){const n=await s.json();p();
6const r=new URL(window.location.href);F.get(r.pathname+r.search,{},{only:["conversations","stats"],preserveState:!0,preserveScroll:!0}),n.updated_conversations>0&&d.success(a("Successfully marked :count conversation(s) as unread.",{count:n.updated_conversations}))}else{const n=await s.json();d.error(n.error||a("Failed to mark conversations as unread."))}}catch(s){console.error("Error marking conversations as unread:",s),d.error(a("Failed to mark conversations as unread. Please try again."))}finally{Z(!1)}}},_e=async()=>{if(c.size!==0){Q(!0);try{const s=await fetch(route("inbox.messages.bulk-action"),{method:"POST",headers:{"Content-Type":"application/json","X-CSRF-TOKEN":_()},body:JSON.stringify({conversation_ids:Array.from(c),action:"archive"})});if(s.ok){const n=await s.json();p();const r=new URL(window.location.href);F.get(r.pathname+r.search,{},{only:["conversations","stats"],preserveState:!0,preserveScroll:!0}),n.processed>0&&d.success(a("Successfully archived :count conversation(s).",{count:n.processed}))}else{const n=await s.json();d.error(n.error||a("Failed to archive conversations."))}}catch(s){console.error("Error archiving conversations:",s),d.error(a("Failed to archive conversations. Please try again."))}finally{Q(!1)}}},Se=async s=>{if(c.size===0)return;const n=c.size;ae(!0);try{const r=await fetch(route("inbox.messages.bulk-action"),{method:"POST",headers:{"Content-Type":"application/json","X-CSRF-TOKEN":_()},body:JSON.stringify({conversation_ids:Array.from(c),action:"set-language",language:s})});if(!r.ok){const o=await r.json();d.error(o.error||a("Failed to change conversation language."));return}p(),d.success(a("Language changed for :count conversation(s).",{count:n})),F.reload({only:["conversations","available_languages"]})}catch(r){console.error("Error changing conversation language:",r),d.error(a("Failed to change conversation language."))}finally{ae(!1)}},Be=async()=>{if(c.size!==0){ee(!0);try{await Promise.all(Array.from(c).map(s=>fetch(route("inbox.messages.translate",s),{method:"POST",headers:{"Content-Type":"application/json","X-CSRF-TOKEN":_()}}))),p(),d.success(a("Translated :count conversation(s).",{count:c.size})),F.reload({only:["conversations"]})}catch{d.error(a("Failed to translate conversations."))}finally{ee(!1)}}};l.useEffect(()=>{te(T||[]),oe((x==null?void 0:x.next_cursor)||null),ne((x==null?void 0:x.has_more)||!1),p()},[T,x]),l.useEffect(()=>{if(!h||!k.current)return;const s=k.current.querySelector(`[data-conversation-id="${h.conversation_id}"]`);if(s){const n=k.current,r=s.getBoundingClientRect(),o=n.getBoundingClientRect();(r.top<o.top||r.bottom>o.bottom)&&s.scrollIntoView({block:"nearest",behavior:"smooth"})}},[m,h==null?void 0:h.conversation_id]);const ke=l.useCallback(async()=>{if(!(A||!y||!M)){re(!0);try{const s=new URL(route("inbox.messages.conversations-json")),n=Array.isArray(t.channel)?t.channel:t.channel?[t.channel]:[];n.length>0&&n.forEach((o,i)=>{s.searchParams.set(`channel[${i}]`,o)}),t.status&&t.status!=="all"&&s.searchParams.set("status",t.status),t.platform&&t.platform!=="all"&&s.searchParams.set("platform",t.platform),t.sort&&t.sort!=="newest"&&s.searchParams.set("sort",t.sort),t.language&&t.language!=="all"&&s.searchParams.set("language",t.language),s.searchParams.set("cursor",M);const r=await fetch(s.toString(),{headers:{"Content-Type":"application/json","X-CSRF-TOKEN":_()}});if(r.ok){const o=await r.json();te(i=>[...i,...o.conversations]),oe(o.pagination.next_cursor),ne(o.pagination.has_more),console.log(`📄 Loaded more conversations, has more: ${o.pagination.has_more}`)}else console.error("Failed to load more conversations")}catch(s){console.error("Error loading more conversations:",s)}finally{re(!1)}}},[A,y,M,t]),{sentinelRef:Ae}=qe({hasMore:y,loading:A,onLoadMore:ke,threshold:.1,rootMargin:"200px"}),Fe=s=>{const n=s.includes("Z")||s.includes("+")?s:s.replace(" ","T")+"Z",r=new Date(n),o=new Date,i=Math.floor((o.getTime()-r.getTime())/(1e3*60));if(i<1)return a("Just now");if(i<60){const C=i;return C===1?a("1 minute ago"):a(":count minutes ago",{count:C})}if(i<1440){const C=Math.floor(i/60);return C===1?a("1 hour ago"):a(":count hours ago",{count:C})}if(i<2880)return a("Yesterday");if(i<10080)return r.toLocaleDateString("en-GB",{weekday:"long"});const Me=r.getFullYear()===o.getFullYear();return r.toLocaleDateString("en-GB",{day:"numeric",month:"short",...Me?{}:{year:"numeric"}})},le=s=>{switch(s){case"facebook_messenger":return e.jsx("img",{src:"/images/fb-logo.svg",alt:"Facebook",className:"h-4 w-4"});case"instagram_direct":return e.jsx("img",{src:"/images/insta-logo.svg",alt:"Instagram",className:"h-4 w-4"});case"tiktok_direct":return e.jsx("img",{src:"/images/tiktok-logo.svg",alt:"TikTok",className:"h-4 w-4"});case"x_direct":return e.jsx("img",{src:"/images/x-logo.svg",alt:"X",className:"h-4 w-4"});default:return null}},ie=(s,n=60)=>s.length<=n?s:s.substring(0,n)+"...",Te={image:`📷 ${a("Image")}`,video:`🎬 ${a("Video")}`,audio:`🎵 ${a("Audio")}`,file:`📎 ${a("File")}`,story_mention:`📸 ${a("Story mention")}`,share:`🔗 ${a("Shared post")}`,media:`📎 ${a("Media")}`},Ie=s=>s.last_message_over_quota?ie(s.last_message_content):Te[s.last_message_type??""]??ie(s.last_message_content),Le=s=>{const n=V.find(r=>r.id===s);return(n==null?void 0:n.platform_page_name)||a("Unknown Channel")},E=m.length>0&&m.every(s=>c.has(s.conversation_id)),Oe=!E&&m.some(s=>c.has(s.conversation_id));return e.jsxs("div",{className:"flex flex-col h-full bg-white border-r border-t border-[#2D1B3D]/8 relative overflow-visible rounded-tr-xl",children:[e.jsx("div",{className:"px-3 pt-3 pb-3 relative overflow-visible z-10 bg-white rounded-tr-xl",children:e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("div",{className:"relative flex-1",children:[e.jsx(Je,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-[#2D1B3D]/40"}),e.jsx(me,{placeholder:a("Search conversations..."),value:L,onChange:s=>q(s.target.value),onKeyDown:s=>{s.key==="Enter"&&j("search",L)},className:"pl-10 pr-10 h-10 bg-white border-[#2D1B3D]/10 rounded-xl focus-visible:ring-[#FAC234] focus-visible:border-[#FAC234] text-[#2D1B3D] placeholder:text-[#2D1B3D]/40 w-full"}),K&&e.jsx("div",{className:"absolute right-3 top-1/2 -translate-y-1/2",children:e.jsx(f,{className:"h-4 w-4 animate-spin text-[#FAC234]"})}),!K&&L&&e.jsx("button",{onClick:()=>{q(""),j("search","")},className:"absolute right-3 top-1/2 -translate-y-1/2 text-[#2D1B3D]/40 hover:text-[#2D1B3D]/60",children:e.jsx(ue,{className:"h-4 w-4"})})]}),$&&e.jsxs(b,{children:[e.jsx(v,{asChild:!0,children:e.jsx(D,{variant:"outline",size:"icon",onClick:$,disabled:X,className:"h-10 w-10 shrink-0 rounded-xl border-[#2D1B3D]/10 bg-white text-[#2D1B3D]/60 hover:text-[#2D1B3D]",children:e.jsx(Ye,{className:S("h-4 w-4",X&&"animate-spin")})})}),e.jsx(w,{children:a("Refresh conversations")})]})]}),e.jsx(Ke,{channels:ve,value:be,onValueChange:we,placeholder:a("All Channels"),className:"text-sm h-10 w-full bg-white border-[#2D1B3D]/12 rounded-xl text-[#2D1B3D] font-medium hover:bg-[#2D1B3D]/5"}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs(P,{value:t.status||"all",onValueChange:s=>j("status",s==="all"?"":s),children:[e.jsx(z,{className:"text-sm h-10 flex-1 bg-white border-[#2D1B3D]/12 rounded-xl text-[#2D1B3D] font-medium hover:bg-[#2D1B3D]/5 focus:ring-[#FAC234] focus:ring-offset-0",children:e.jsx(R,{placeholder:a("Status")})}),e.jsxs(U,{children:[e.jsx(u,{value:"all",children:a("All Conversations")}),e.jsx(u,{value:"unread",children:a("Unread Only")}),e.jsx(u,{value:"starred",children:a("Starred Only")}),e.jsx(u,{value:"archived",children:a("Archived Only")})]})]}),e.jsxs(P,{value:t.sort||"newest",onValueChange:s=>j("sort",s),children:[e.jsxs(z,{className:"text-sm h-10 flex-1 bg-white border-[#2D1B3D]/12 rounded-xl text-[#2D1B3D] font-medium hover:bg-[#2D1B3D]/5 focus:ring-[#FAC234] focus:ring-offset-0",children:[e.jsx(Ze,{className:"mr-2 h-3.5 w-3.5 text-[#8D5CC0]"}),e.jsx(R,{placeholder:a("Sort")})]}),e.jsxs(U,{children:[e.jsx(u,{value:"newest",children:a("Newest First")}),e.jsx(u,{value:"oldest",children:a("Oldest First")})]})]})]}),g.length>0&&e.jsxs(P,{value:t.language||"all",onValueChange:s=>j("language",s==="all"?"":s),onOpenChange:s=>!s&&J(""),children:[e.jsxs(z,{"aria-label":a("Language"),className:"text-sm h-10 w-full bg-white border-[#2D1B3D]/12 rounded-xl text-[#2D1B3D] font-medium hover:bg-[#2D1B3D]/5 focus:ring-[#FAC234] focus:ring-offset-0",children:[e.jsx(xe,{className:"mr-2 h-3.5 w-3.5 text-[#8D5CC0]"}),e.jsx(R,{placeholder:a("Language")})]}),e.jsxs(U,{children:[g.length>8&&e.jsx(me,{autoFocus:!0,placeholder:a("Search languages..."),value:B,onChange:s=>J(s.target.value),onKeyDown:s=>s.stopPropagation(),className:"mb-1 h-8 text-sm"}),e.jsx(u,{value:"all",children:a("All languages")}),De.map(s=>e.jsxs(u,{value:s,children:[N.of(s)??s.toUpperCase()," (",s.toUpperCase(),")"]},s))]})]})]})}),e.jsx(He,{initial:!1,children:c.size>0&&e.jsx(Qe.div,{initial:{height:0,opacity:0}
6,animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.2,ease:"easeInOut"},className:"overflow-hidden",children:e.jsxs("div",{className:"px-3 py-2 border-b border-[#FAC234]/20 bg-[#FAC234]/8 flex items-center gap-2",children:[e.jsx(de,{checked:E?!0:Oe?"indeterminate":!1,onCheckedChange:ye,disabled:m.length===0,"aria-label":a("Select all conversations"),className:"size-5 hover:border-[#FAC234] hover:shadow-[0_0_0_3px_rgba(250,194,52,0.15)] transition-shadow"}),e.jsx("span",{className:"text-xs font-semibold text-[#2D1B3D]/60 select-none min-w-0 flex-1",children:a(":count selected",{count:c.size})}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsxs(b,{children:[e.jsx(v,{asChild:!0,children:e.jsx(D,{variant:"ghost",size:"sm",onClick:_e,disabled:H,className:"h-7 w-7 p-0 text-[#2D1B3D]/70 hover:text-[#2D1B3D] hover:bg-[#2D1B3D]/8 rounded-lg",children:H?e.jsx(f,{className:"w-4 h-4 animate-spin"}):e.jsx(ge,{className:"w-4 h-4"})})}),e.jsx(w,{children:e.jsx("p",{children:a("Archive")})})]}),e.jsxs(b,{children:[e.jsx(v,{asChild:!0,children:e.jsx(D,{variant:"ghost",size:"sm",onClick:Ce,disabled:Y,className:"h-7 w-7 p-0 text-[#2D1B3D]/70 hover:text-[#2D1B3D] hover:bg-[#2D1B3D]/8 rounded-lg",children:Y?e.jsx(f,{className:"w-4 h-4 animate-spin"}):e.jsx(ns,{className:"w-4 h-4"})})}),e.jsx(w,{children:e.jsx("p",{children:a("Mark as unread")})})]}),e.jsxs(b,{children:[e.jsx(v,{asChild:!0,children:e.jsx(D,{variant:"ghost",size:"sm",onClick:Be,disabled:W,className:"h-7 w-7 p-0 text-[#8D5CC0] hover:text-[#2D1B3D] hover:bg-[#8D5CC0]/10 rounded-lg",children:W?e.jsx(f,{className:"w-4 h-4 animate-spin"}):e.jsx(xe,{className:"w-4 h-4"})})}),e.jsx(w,{children:e.jsx("p",{children:a("Translate")})})]}),g.length>0&&e.jsxs(Ue,{children:[e.jsxs(b,{children:[e.jsx(v,{asChild:!0,children:e.jsx(Ve,{asChild:!0,children:e.jsx(D,{variant:"ghost",size:"sm",disabled:se,className:"h-7 w-7 p-0 text-[#2D1B3D]/70 hover:text-[#2D1B3D] hover:bg-[#2D1B3D]/8 rounded-lg",children:se?e.jsx(f,{className:"w-4 h-4 animate-spin"}):e.jsx(es,{className:"w-4 h-4"})})})}),e.jsx(w,{children:e.jsx("p",{children:a("Change language")})})]}),e.jsx($e,{align:"end",className:"max-h-64 overflow-y-auto",children:g.map(s=>e.jsx(Xe,{onClick:()=>Se(s),children:N.of(s)??s.toUpperCase()},s))})]})]}),e.jsxs(b,{children:[e.jsx(v,{asChild:!0,children:e.jsx(D,{variant:"ghost",size:"sm",onClick:p,className:"h-7 w-7 p-0 text-[#2D1B3D]/40 hover:text-[#2D1B3D] rounded-lg",children:e.jsx(ue,{className:"w-4 h-4"})})}),e.jsx(w,{children:e.jsx("p",{children:a("Clear selection")})})]})]})})}),e.jsxs("div",{ref:k,className:"flex-1 overflow-y-auto conversations-list-scroll bg-white",children:[fe?e.jsxs("div",{className:"p-8 text-center",children:[e.jsx(f,{className:"h-6 w-6 animate-spin text-[#FAC234] mx-auto mb-2"}),e.jsx("p",{className:"text-sm text-[#2D1B3D]/50",children:a("Loading conversations...")})]}):m.length===0?e.jsxs("div",{className:"p-8 text-center",children:[e.jsx("div",{className:"w-14 h-14 bg-[#2D1B3D]/8 rounded-2xl flex items-center justify-center mx-auto mb-4",children:e.jsx(he,{className:"h-7 w-7 text-[#8D5CC0]/50"})}),e.jsx("h3",{className:"text-[15px] font-bold text-[#2D1B3D] mb-1.5",children:a("No conversations")}),e.jsx("p",{className:"text-sm text-[#8D5CC0]",children:(Array.isArray(t.channel)?t.channel.length>0:t.channel)||t.status?a("Try adjusting your filters."):a("Messages will appear here when customers contact you.")})]}):e.jsxs("div",{className:"p-2 space-y-1.5",children:[m.map(s=>{const n=(()=>{if(t.status==="unread"&&s.unread_count===0||t.status==="archived"&&s.status!=="archived"||t.status==="starred"&&!s.is_starred||!t.status&&s.status==="archived")return!1;const i=Array.isArray(t.channel)?t.channel:t.channel?[t.channel]:[];return!(i.length>0&&!i.includes(s.connected_channel_id.toString()))})(),r=(h==null?void 0:h.conversation_id)===s.conversation_id,o=r&&!n;return e.jsx("div",{"data-conversation-id":s.conversation_id,onClick:()=>pe(s),onMouseEnter:()=>I==null?void 0:I(s.conversation_id),className:S("px-3 py-4 cursor-pointer transition-colors duration-150 relative rounded-xl border border-l-[5px] select-none","hover:bg-[#FAC234]/5",r?"bg-[#FAC234]/8 border-[#FAC234]/20 border-l-[#FAC234]":s.has_unread?"bg-[#F5F0FB] border-[#2D1B3D]/8 border-l-[#5B2D8E]":"bg-white border-[#2D1B3D]/8 border-l-[#2D1B3D]/15",o&&"opacity-70"),children:e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("div",{className:"flex-shrink-0 pt-[3px]",onClick:i=>i.stopPropagation(),children:e.jsx(de,{checked:c.has(s.conversation_id),onCheckedChange:()=>Ne(s.conversation_id),"aria-label":a("Select conversation"),className:"size-[18px] hover:border-[#FAC234] hover:shadow-[0_0_0_3px_rgba(250,194,52,0.15)] transition-shadow"})}),e.jsxs("div",{className:"relative flex-shrink-0",children:[e.jsxs(Pe,{className:"h-11 w-11",children:[s.partner_profile_picture_url?e.jsx(ze,{src:s.partner_profile_picture_url,alt:s.partner_name||"Profile"}):null,e.jsx(Re,{className:"font-bold text-sm bg-[#2D1B3D]/10 text-[#2D1B3D]",children:je(s.partner_name||"")})]}),le(s.platform)&&e.jsx("div",{className:"absolute -bottom-0.5 -right-0.5 rounded-full bg-white p-[1px] shadow-sm",children:le(s.platform)})]}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center justify-between mb-0.5",children:[e.jsxs("div",{className:"flex items-center gap-1.5 min-w-0",children:[e.jsx("h3",{className:S("text-[14px] truncate leading-tight",s.has_unread||r?"font-bold text-[#2D1B3D]":"font-medium text-[#2D1B3D]/70"),children:s.partner_name}),e.jsx("span",{className:"text-[10px] font-medium text-[#5B2D8E] bg-[#5B2D8E]/10 px-1.5 py-0 rounded-full flex-shrink-0",children:Le(s.connected_channel_id)}),s.detected_language&&e.jsx("span",{className:S("text-[10px] font-semibold tracking-wide text-[#2D1B3D]/40 flex-shrink-0"),"aria-label":a("Detected language"),children:N.of(s.detected_language)??s.detected_language.toUpperCase()}),s.is_starred&&e.jsx(ss,{className:"w-3.5 h-3.5 text-[#FAC234] fill-current flex-shrink-0","aria-label":"Starred conversation"}),s.has_notes&&e.jsx(as,{className:"w-3 h-3 text-[#8D5CC0]/50 flex-shrink-0","aria-label":"Has notes"}),s.ai_enabled===!1&&e.jsx(ts,{className:"w-3 h-3 text-[#2D1B3D]/30 flex-shrink-0","aria-label":"AI paused"})]}),e.jsxs("div",{className:"flex items-center gap-1.5 flex-shrink-0 ml-1",children:[s.has_unread&&e.jsx("span",{className:"inline-flex items-center justify-center min-w-[18px] h-[18px] px-1 bg-[#FAC234] text-[#2D1B3D] text-[10px] font-bold rounded-full",children:s.unread_count>0?s.unread_count:"●"}),e.jsx("span",{className:"text-[11px] tabular-nums text-[#2D1B3D]/40",children:Fe(s.last_message_at)})]})]}),e.jsx("p",{className:S("text-[13px] truncate mb-2",s.has_unread||r?"text-[#2D1B3D]/80 font-semibold":"text-[#2D1B3D]/40",s.last_message_over_quota&&"blur-sm select-none"),children:Ie(s)}),e.jsx("div",{className:"flex items-center justify-between",children:e.jsxs("div",{className:"flex items-center gap-1",children:[s.status==="archived"&&e.jsxs(ce,{variant:"outline",className:"text-[10px] px-1.5 py-0 h-5 border-[#2D1B3D]/15 text-[#2D1B3D]/50",children:[e.jsx(ge,{className:"w-2.5 h-2.5 mr-1"}),a("Archived")]}),o&&e.jsx(ce,{variant:"outline",className:"text-[10px] px-1.5 py-0 h-5 border-[#FAC234] text-[#2D1B3D] bg-[#FAC234]/10",children:a("Hidden by filter")})]})})]})]})},s.conversation_id)}),y&&e.jsx("div",{ref:Ae,className:"h-4"})]}),A&&e.jsx("div",{className:"p-4 flex items-center justify-center",children:e.jsxs("div",{className:"flex items-center gap-2 text-[#8D5CC0]",children:[e.jsx(f,{className:"h-4 w-4 animate-spin"}),e.jsx("span",{className:"text-sm font-medium",children:a("Loading more conversations...")})]})}),!y&&m.length>0&&e.jsx("div",{className:"p-5 text-center",children:e.jsx("p",{className:"text-xs text-[#2D1B3D]/25 font-medium tracking-wide uppercase",children:a("End of conversations")})})]})]})}export{ea as ConversationsList};

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.