PageSourceSearch

https://sendunlimitedemail.com/sue/mod-E_8Uc_EM.js

js sendunlimitedemail.com collected 2026-10-05 06:26:15 UTC 21,930 bytes, 1 lines download raw bytes

1import{k as ee,r as i,e as m,j as e,h as b,V as te,Z as se,G as E,t as o,i as q,o as ae}from"./edge-BOITG1XR.js";import{a as $}from"./mod-CMEfXRCr.js";import{B as W}from"./mod-D5xxkeD6.js";import{R as G}from"./mod-RPxq32x0.js";import{L as p}from"./mod-DxqX0N6D.js";import{T as le,a as re}from"./mod-BaZPqQwn.js";import{E as ie}from"./mod-OWtIy5n2.js";import{E as oe}from"./mod-DlaYEcom.js";import{C as de}from"./mod-CdBQyGbT.js";import{C as ne}from"./mod-BelLWb3f.js";import{E as ce}from"./mod-B_npTkgx.js";import{S as xe}from"./mod-D5o00wMq.js";import{X as me}from"./mod-C3kaoPgB.js";import{S as pe}from"./mod-CIn4OWcr.js";import{C as H}from"./mod-CmjZ4fHE.js";import{C as he}from"./mod-Dzi2dmtd.js";import{T as be}from"./mod-BuHkwEt_.js";const ue=[["path",{d:"M13 21h8",key:"1jsn5i"}],["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]],R=ee("pen-line",ue),U={pending:"bg-amber-100 text-amber-700",processing:"bg-blue-100 text-blue-700",review:"bg-violet-100 text-violet-700",completed:"bg-emerald-100 text-emerald-700",failed:"bg-red-100 text-red-700"},ge=({submission:s,onClose:u,onRefresh:n})=>{const[f,c]=i.useState(!1),[S,N]=i.useState(!1),[v,y]=i.useState(!1),[w,A]=i.useState(!1),[_,C]=i.useState(!1),a=(()=>{try{return typeof s.ai_response=="string"?JSON.parse(s.ai_response):s.ai_response??{}}catch{return{}}})(),T=Object.keys(a).length>0,j=s.product_id&&s.status==="review",P=async()=>{c(!0);try{await m.post(`/ai/agent/submissions/${s.id}/publish`),o.success("✅ Product is now LIVE!"),n(),u()}catch{o.error("Failed to publish product")}finally{c(!1)}},D=async()=>{N(!0);try{await $.retrySubmission(s.id),o.success("Re-processing with AI..."),setTimeout(()=>{n()},4e3)}catch{o.error("Retry failed")}finally{N(!1)}},I=async()=>{if(confirm("Delete this submission?")){y(!0);try{await $.deleteSubmission(s.id),o.success("Deleted"),n(),u()}catch{o.error("Delete failed")}finally{y(!1)}}};return e.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-end bg-black/40 backdrop-blur-sm",onClick:u,children:e.jsxs("div",{className:"h-full w-full max-w-lg overflow-y-auto bg-white shadow-2xl",onClick:r=>r.stopPropagation(),children:[e.jsxs("div",{className:"sticky top-0 z-10 flex items-center justify-between border-b bg-white px-5 py-4",children:[e.jsxs("div",{children:[e.jsxs("h3",{className:"font-bold text-slate-900",children:["Submission #",s.id]}),e.jsx("span",{className:b("mt-0.5 inline-block rounded-full px-2 py-0.5 text-[10px] font-bold",U[s.status]??"bg-slate-100 text-slate-600"),children:s.status})]}),e.jsx("button",{onClick:u,className:"rounded-lg p-2 hover:bg-slate-100 text-slate-400",children:e.jsx(me,{className:"h-5 w-5"})})]}),e.jsxs("div",{className:"p-5 space-y-4",children:[e.jsxs("div",{className:"rounded-xl bg-slate-50 p-4 space-y-1.5 text-sm",children:[e.jsx("p",{className:"text-xs font-bold text-slate-500 uppercase tracking-wide mb-2",children:"Received from Telegram"}),s.product_name&&e.jsxs("p",{children:[e.jsx("span",{className:"font-medium",children:"Hint:"})," ",s.product_name]}),s.selling_price&&e.jsxs("p",{children:[e.jsx("span",{className:"font-medium",children:"Price:"})," AED ",s.selling_price]}),e.jsx("p",{className:"text-xs text-slate-400",children:new Date(s.created_at).toLocaleString()})]}),(()=>{try{const r=typeof s.images_received=="string"?JSON.parse(s.images_received):s.images_received??[];if(r[0])return e.jsxs("div",{children:[e.jsx("p",{className:"text-xs font-bold text-slate-500 uppercase tracking-wide mb-2",children:"Product Image"}),e.jsx("img",{src:r[0],alt:"product",className:"w-full max-h-48 object-contain rounded-xl border border-slate-100 bg-slate-50"})]})}catch{return null}})(),T?e.jsxs("div",{className:"space-y-3",children:[e.jsxs("p",{className:"text-xs font-bold text-slate-500 uppercase tracking-wide flex items-center gap-1.5",children:[e.jsx(pe,{className:"h-3.5 w-3.5 text-violet-500"})," AI Generated Content"]}),a.name&&e.jsxs("div",{className:"rounded-xl bg-violet-50 border border-violet-100 p-3",children:[e.jsx("p",{className:"text-[10px] font-bold text-violet-400 mb-0.5",children:"PRODUCT TITLE"}),e.jsx("p",{className:"font-bold text-slate-900 text-sm",children:a.name})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[a.suggested_category&&e.jsxs("div",{className:"rounded-xl bg-blue-50 p-3",children:[e.jsx("p",{className:"text-[10px] font-bold text-blue-400 mb-0.5",children:"CATEGORY"}),e.jsx("p",{className:"text-sm font-semibold text-slate-800",children:a.suggested_category})]}),a.brand&&e.jsxs("div",{className:"rounded-xl bg-slate-50 p-3",children:[e.jsx("p",{className:"text-[10px] font-bold text-slate-400 mb-0.5",children:"BRAND"}),e.jsx("p",{className:"text-sm font-semibold text-slate-800",children:a.brand})]})]}),a.short_description&&e.jsxs("div",{className:"rounded-xl bg-slate-50 p-3",children:[e.jsx("p",{className:"text-[10px] font-bold text-slate-400 mb-0.5",children:"SHORT DESCRIPTION"}),e.jsx("p",{className:"text-sm text-slate-700 leading-relaxed",children:a.short_description})]}),a.features?.length>0&&e.jsxs("div",{className:"rounded-xl border border-slate-100 overflow-hidden",children:[e.jsxs("button",{onClick:()=>C(r=>!r),className:"flex w-full items-center justify-between bg-slate-50 px-3 py-2.5 text-xs font-bold text-slate-700",children:["Key Features (",a.features.length,")",_?e.jsx(H,{className:"h-3.5 w-3.5"}):e.jsx(q,{className:"h-3.5 w-3.5"})]}),_&&e.jsx("ul",{className:"p-3 space-y-1",children:a.features.map((r,h)=>e.jsxs("li",{className:"flex items-start gap-2 text-xs text-slate-700",children:[e.jsx(ae,{className:"h-3.5 w-3.5 shrink-0 mt-0.5 text-emerald-500"})," ",r]},h))})]}),a.seo_title&&e.jsxs("div",{className:"rounded-xl bg-blue-50 border border-blue-100 p-3 space-y-1",children:[e.jsx("p",{className:"text-[10px] font-bold text-blue-400",children:"SEO TITLE"}),e.jsx("p",{className:"text-xs font-semibold text-slate-800",children:a.seo_title}),a.seo_description&&e.jsx("p",{className:"text-xs text-slate-500",children:a.seo_de
1scription}),a.seo_keywords&&e.jsx("p",{className:"text-[11px] text-blue-500",children:a.seo_keywords})]}),a.tags?.length>0&&e.jsxs("div",{children:[e.jsx("p",{className:"text-[10px] font-bold text-slate-400 mb-1.5",children:"TAGS"}),e.jsx("div",{className:"flex flex-wrap gap-1.5",children:a.tags.map((r,h)=>e.jsx("span",{className:"rounded-full bg-violet-100 text-violet-700 px-2.5 py-0.5 text-[11px] font-semibold",children:r},h))})]}),a.faq?.length>0&&e.jsxs("div",{className:"rounded-xl border border-slate-100 overflow-hidden",children:[e.jsxs("button",{onClick:()=>A(r=>!r),className:"flex w-full items-center justify-between bg-slate-50 px-3 py-2.5 text-xs font-bold text-slate-700",children:["FAQ (",a.faq.length," questions)",w?e.jsx(H,{className:"h-3.5 w-3.5"}):e.jsx(q,{className:"h-3.5 w-3.5"})]}),w&&e.jsx("div",{className:"p-3 space-y-2",children:a.faq.map((r,h)=>e.jsxs("div",{className:"text-xs",children:[e.jsxs("p",{className:"font-semibold text-slate-800",children:["Q: ",r.question]}),e.jsxs("p",{className:"text-slate-500 mt-0.5",children:["A: ",r.answer]})]},h))})]}),a.price_estimate>0&&!s.selling_price&&e.jsxs("div",{className:"rounded-xl bg-emerald-50 p-3",children:[e.jsx("p",{className:"text-[10px] font-bold text-emerald-400 mb-0.5",children:"AI PRICE ESTIMATE"}),e.jsxs("p",{className:"text-lg font-black text-emerald-700",children:["AED ",a.price_estimate]})]})]}):e.jsxs("div",{className:"rounded-xl bg-amber-50 border border-amber-100 p-4 text-center",children:[e.jsx(he,{className:"h-8 w-8 text-amber-400 mx-auto mb-2"}),e.jsx("p",{className:"text-sm font-semibold text-amber-700",children:"AI content not generated yet"}),e.jsx("p",{className:"text-xs text-amber-600 mt-1",children:"No AI API key configured, or processing failed. Click Retry to re-process."})]}),s.product_id&&e.jsx("div",{className:b("rounded-xl p-3 text-xs font-semibold flex items-center gap-2",j?"bg-amber-50 border border-amber-200 text-amber-700":"bg-emerald-50 border border-emerald-200 text-emerald-700"),children:j?"📝 Product saved as DRAFT — not visible in store yet":"✅ Product is LIVE in store"}),e.jsxs("div",{className:"flex flex-wrap gap-2 pt-1",children:[j&&e.jsxs("button",{onClick:P,disabled:f,className:"flex-1 flex items-center justify-center gap-2 rounded-xl bg-emerald-600 py-2.5 text-sm font-bold text-white hover:bg-emerald-700 disabled:opacity-60",children:[f?e.jsx(p,{className:"h-4 w-4 animate-spin"}):e.jsx(E,{className:"h-4 w-4"}),f?"Publishing...":"Publish Live"]}),s.product_id&&e.jsxs("a",{href:`/admin/products/edit/${s.product_id}`,className:"flex items-center gap-2 rounded-xl border border-violet-200 bg-violet-50 px-4 py-2.5 text-sm font-semibold text-violet-700 hover:bg-violet-100",children:[e.jsx(R,{className:"h-4 w-4"})," Edit Product"]}),!s.product_id&&e.jsxs("button",{onClick:D,disabled:S,className:"flex-1 flex items-center justify-center gap-2 rounded-xl border border-violet-200 bg-violet-50 px-3 py-2.5 text-sm font-semibold text-violet-700 hover:bg-violet-100 disabled:opacity-60",children:[S?e.jsx(p,{className:"h-4 w-4 animate-spin"}):e.jsx(G,{className:"h-4 w-4"}),"Retry AI"]}),e.jsx("button",{onClick:I,disabled:v,className:"ml-auto flex items-center gap-2 rounded-xl border border-red-100 bg-red-50 px-3 py-2.5 text-sm font-semibold text-red-500 hover:bg-red-100 disabled:opacity-60",children:v?e.jsx(p,{className:"h-4 w-4 animate-spin"}):e.jsx(be,{className:"h-4 w-4"})})]})]})]})})};function Fe(){const[s,u]=i.useState({telegram_bot_token:"",telegram_admin_chat_id:"",telegram_webhook_secret:""}),[n,f]=i.useState(!1),[c,S]=i.useState([]),[N,v]=i.useState(!0),[y,w]=i.useState(!1),[A,_]=i.useState(!1),[C,a]=i.useState(!1),[T,j]=i.useState(!1),[P,D]=i.useState({}),[I,r]=i.useState(null),[h,F]=i.useState(!1),[O,L]=i.useState(!1),B=`${window.location.origin.replace(":5173",":8080")}/api/telegram/webhook`;i.useEffect(()=>{k()},[]);const k=async()=>{v(!0);try{const[t,l,x]=await Promise.allSettled([m.get("/admin/telegram/settings").then(d=>d.data),m.get("/ai/agent/submissions",{params:{source:"telegram"}}).then(d=>d.data?.data||d.data||[]),m.get("/admin/ai-settings").then(d=>d.data)]);t.status==="fulfilled"&&u(t.value),l.status==="fulfilled"&&S(Array.isArray(l.value)?l.value:[]),x.status==="fulfilled"&&f(x.value?.auto_create_product==="1")}catch{}finally{v(!1)}},V=async()=>{w(!0);try{await m.put("/admin/telegram/settings",s),o.success("Telegram settings saved")}catch{o.error("Failed to save settings")}finally{w(!1)}},z=async()=>{_(!0);try{await m.post("/admin/telegram/test"),o.success("Test message sent! Check your Telegram.")}catch(t){o.error(t.response?.data?.message||"Test failed — check Bot Token and Chat ID")}finally{_(!1)}},J=async()=>{a(!0);try{const t=await m.post("/admin/telegram/set-webhook");o.success(t.data?.message||"Webhook registered ✅"),k()}catch(t){o.error(t.response?.data?.message||"Failed to set webhook")}finally{a(!1)}},K=async()=>{F(!0);const t=!n;try{await m.put("/admin/ai-settings",{auto_create_product:t?"1":"0"}),f(t),o.success(t?"✅ Auto-approve ON — products publish instantly":"📋 Auto-approve OFF — products go to review queue")}catch{o.error("Failed to update setting")}finally{F(!1)}},M=async()=>{const t=c.filter(l=>l.status==="review"&&l.product_id);if(!t.length){o.error("No draft products to publish");return}L(!0);try{const l=await m.post("/ai/agent/submissions/bulk-publish",{ids:t.map(x=>x.id)});o.success(`✅ ${l.data.published} products published live!`),k()}catch{o.error("Bulk publish failed")}finally{L(!1)}},Q=()=>{navigator.clipboard.writeText(B),j(!0),setTimeout(()=>j(!1),2e3)},Y=t=>D(l=>({...l,[t]:!l[t]})),g={total:c.length,review:c.filter(t=>t.status==="review").length,completed:c.filter(t=>t.status==="completed").length,failed:c.filter(t=>t.status==="failed").length};return e.jsxs("div",{className:"space-y-6 max-w-5xl mx-auto",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"flex h-10 w-10 items-center justify-center rounded-xl bg-blue-100",children:e.jsx(W,{className:"h-5 w-5 text-blue-600"})}),e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl font-bold text-slate-900",children:"Telegram AI Agent"}),e.jsx("p",{className:"text-sm text-slate-500",children:"Send product photos to Telegram → AI creates listings automatically"})]})]}),e.jsx("button",{onClick:k,className:"flex items-center gap-2 rounded-xl border border-slate-200 px-3 py-2 text-sm text-slate-600 hover:bg-slate-50",children:e.jsx(G,{className:b("h-4 w-4",N&&"animate-spin")})})]}),e.jsxs("div",{className:b("rounded-2xl border p-4 flex items-center justify-between gap-4",n?"bg-emerald-50 border-emerald-200":"bg-amber-50 border-amber-200"),children:[e.jsxs("div",{children:[e.jsx("p",{className:b("font-bold text-sm",n?"text-emerald-800":"text-amber-800"),children:n?"⚡ Auto-Approve is ON — Products publish instantly":"📋 Auto-Approve is OFF — Products go to Review queue"}),e.jsx("p",{className:b("text-xs mt-0.5",n?"text-emerald-600":"text-amber-600"),children:n?"Send photo → AI analyses → product live in store. No manual step needed.":"Send photo → AI analyses → product waits in queue below for you to approve."})]}),e.jsx("button",{onClick:K,disabled:h,className:"shrink-0",children:h?e.jsx(p,{className:"h-8 w-8 animate-spin text-slate-400"}):n?e.jsx(le,{className:"h-10 w-10 text-emerald-500"}):e.jsx(re,{className:"h-10 w-10 text-amber-400"})})]}),e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[e.jsxs("div",{className:"rounded-2xl border border-slate-100 bg-white p-5 shadow-sm space-y-4",children:[e.jsxs("h2",{className:"font-bold text-slate-900 flex items-center gap-2",children:[e.jsx(te,{className:"h-4 w-4 text-violet-500"})," Bot Configuration"]}),[{key:"telegram_bot_token",label:"Bot Token",placeholder:"1234567890:ABCDEFabcdef...",hint:"From @BotFather on Telegram"},{key:"telegram_admin_chat_id",label:"Admin Chat ID",placeholder:"123456789",hint:"Your personal Telegram ID"}].map(({key:t,label:l,placeholder:x,hint:d})=>e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs font-semibold text-slate-700 mb-1",children:l}),e.jsxs("div",{className:"relative",children:[e.jsx("input",{type:P[t]?"text":"password",value:s[t]||"",onChange:Z=>u(X=>({...X,[t]:Z.target.value})),placeholder:x,className:"w-full rounded-xl border border-slate-200 px-3 py-2.5 pr-10 text-sm outline-none focus:ring-2 focus:ring-violet-100 focus:border-violet-400"}),e.jsx("button",{onClick:()=>Y(t),className:"absolute right-3 top-2.5 text-slate-400 hover:text-slate-600",children:P[t]?e.jsx(ie,{className:"h-4 w-4"}):e.jsx(oe,{className:"h-4 w-4"})})]}),e.jsx("p",{className:"text-xs text-slate-400 mt-1",children:d})]},t)),e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs font-semibold text-slate-700 mb-1",children:"Webhook URL"}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx("input",{readOnly:!0,value:B,className:"flex-1 rounded-xl border border-slate-100 bg-slate-50 px-3 py-2.5 text-xs text-slate-500"}),e.jsxs("button",{onClick:Q,className:"flex items-center gap-1.5 rounded-xl border border-slate-200 px-3 py-2 text-xs font-semibold text-slate-600 hover:bg-slate-50",children:[T?e.jsx(de,{className:"h-3.5 w-3.5 text-emerald-500"}):e.jsx(ne,{className:"h-3.5 w-3.5"}),T?"Copied!":"Copy"]})]})]}),e.jsxs("div",{className:"flex gap-2 pt-1",children:[e.jsxs("button",{onClick:V,disabled:y,className:"flex-1 flex items-center justify-center gap-2 rounded-xl bg-violet-600 py-2.5 text-sm font-bold text-white hover:bg-violet-700 disabled:opacity-60",children:[y?e.jsx(p,{className:"h-4 w-4 animate-spin"}):null,"Save Settings"]}),e.jsxs("button",{onClick:J,disabled:C||!s.telegram_bot_token,className:"flex items-center gap-2 rounded-xl border border-violet-200 bg-vi
1olet-50 px-4 py-2.5 text-sm font-bold text-violet-700 hover:bg-violet-100 disabled:opacity-60",children:[C?e.jsx(p,{className:"h-4 w-4 animate-spin"}):e.jsx(ce,{className:"h-4 w-4"}),"Set Webhook"]}),e.jsxs("button",{onClick:z,disabled:A||!s.telegram_bot_token,className:"flex items-center gap-2 rounded-xl border border-slate-200 px-3 py-2.5 text-sm font-semibold text-slate-600 hover:bg-slate-50 disabled:opacity-60",children:[A?e.jsx(p,{className:"h-4 w-4 animate-spin"}):e.jsx(xe,{className:"h-4 w-4"}),"Test"]})]})]}),e.jsx("div",{className:"space-y-3",children:[{label:"Total Submissions",value:g.total,color:"bg-slate-50   text-slate-900",border:"border-slate-100"},{label:"Products Published",value:g.completed,color:"bg-emerald-50 text-emerald-700",border:"border-emerald-100"},{label:"Waiting Review",value:g.review,color:"bg-violet-50  text-violet-700",border:"border-violet-100"},{label:"Failed",value:g.failed,color:"bg-red-50     text-red-700",border:"border-red-100"}].map(({label:t,value:l,color:x,border:d})=>e.jsxs("div",{className:b("rounded-2xl border p-4 flex items-center justify-between",x,d),children:[e.jsx("span",{className:"text-sm font-medium opacity-70",children:t}),e.jsx("span",{className:"text-2xl font-black",children:l})]},t))})]}),e.jsxs("div",{className:"rounded-2xl border border-blue-100 bg-blue-50 p-4",children:[e.jsx("p",{className:"text-sm font-semibold text-blue-800 mb-2",children:"How to send a product"}),e.jsx("div",{className:"flex flex-wrap gap-x-8 gap-y-1 text-xs text-blue-700",children:["1. Open Telegram → find @AIKartDigiLicenseBot","2. Send a product photo",'3. Optional caption: "price: 299, title: Sony Headphones, condition: new"',"4. AI analyses → product created automatically",'5. If Auto-Approve OFF → click "Add to Store" in the table below'].map((t,l)=>e.jsxs("span",{className:"flex items-center gap-1.5",children:[e.jsx(se,{className:"h-3 w-3 shrink-0"}),t]},l))})]}),e.jsxs("div",{className:"rounded-2xl border border-slate-100 bg-white shadow-sm overflow-hidden",children:[e.jsxs("div",{className:"flex items-center justify-between px-5 py-4 border-b border-slate-100",children:[e.jsx("p",{className:"font-bold text-slate-900",children:"Product Submissions"}),e.jsxs("div",{className:"flex items-center gap-2",children:[g.review>0&&e.jsxs("span",{className:"rounded-full bg-amber-100 text-amber-700 text-xs font-bold px-2.5 py-1",children:[g.review," drafts"]}),g.review>0&&e.jsxs("button",{onClick:M,disabled:O,className:"flex items-center gap-1.5 rounded-xl bg-emerald-600 px-3 py-1.5 text-xs font-bold text-white hover:bg-emerald-700 disabled:opacity-60",children:[O?e.jsx(p,{className:"h-3.5 w-3.5 animate-spin"}):e.jsx(E,{className:"h-3.5 w-3.5"}),"Publish All Drafts"]})]})]}),N?e.jsx("div",{className:"flex items-center justify-center py-16",children:e.jsx(p,{className:"h-8 w-8 animate-spin text-violet-400"})}):c.length===0?e.jsxs("div",{className:"flex flex-col items-center justify-center py-16 text-slate-400 gap-3",children:[e.jsx(W,{className:"h-12 w-12 opacity-30"}),e.jsx("p",{className:"font-semibold",children:"No submissions yet"}),e.jsx("p",{className:"text-sm",children:"Send a product photo to @AIKartDigiLicenseBot to get started"})]}):e.jsxs("table",{className:"w-full text-sm",children:[e.jsx("thead",{className:"bg-slate-50",children:e.jsx("tr",{children:["#","Product","Status","Price","Date","Action"].map(t=>e.jsx("th",{className:"px-4 py-3 text-left text-xs font-semibold text-slate-500 uppercase tracking-wider",children:t},t))})}),e.jsx("tbody",{className:"divide-y divide-slate-50",children:c.map(t=>{const l=(()=>{try{return typeof t.ai_response=="string"?JSON.parse(t.ai_response):t.ai_response??{}}catch{return{}}})(),x=l?.name||t.product_name||`Submission #${t.id}`;return e.jsxs("tr",{className:"hover:bg-slate-50 transition cursor-pointer",onClick:()=>r(t),children:[e.jsxs("td",{className:"px-4 py-3 font-mono text-xs text-slate-400",children:["#",t.id]}),e.jsxs("td",{className:"px-4 py-3",children:[e.jsx("p",{className:"font-semibold text-slate-900 line-clamp-1",children:x}),l?.suggested_category&&e.jsx("p",{className:"text-xs text-slate-400",children:l.suggested_category})]}),e.jsx("td",{className:"px-4 py-3",children:e.jsx("span",{className:b("rounded-full px-2 py-0.5 text-[10px] font-bold",U[t.status]??"bg-slate-100 text-slate-600"),children:t.status})}),e.jsx("td",{className:"px-4 py-3 text-slate-600 font-medium text-xs",children:t.selling_price?`AED ${t.selling_price}`:l?.price_estimate?`~AED ${l.price_estimate}`:"—"}),e.jsx("td",{className:"px-4 py-3 text-slate-400 text-xs",children:new Date(t.created_at).toLocaleStr
1ing(void 0,{day:"numeric",month:"short",hour:"2-digit",minute:"2-digit"})}),e.jsx("td",{className:"px-4 py-3",onClick:d=>d.stopPropagation(),children:t.status==="review"&&t.product_id?e.jsxs("div",{className:"flex gap-1",children:[e.jsxs("button",{onClick:()=>r(t),className:"flex items-center gap-1 rounded-lg bg-emerald-600 px-2.5 py-1.5 text-xs font-bold text-white hover:bg-emerald-700",children:[e.jsx(E,{className:"h-3 w-3"})," Publish"]}),e.jsx("a",{href:`/admin/products/edit/${t.product_id}`,className:"flex items-center gap-1 rounded-lg border border-slate-200 px-2.5 py-1.5 text-xs font-semibold text-slate-600 hover:bg-slate-50",children:e.jsx(R,{className:"h-3 w-3"})})]}):t.status==="completed"&&t.product_id?e.jsxs("a",{href:`/admin/products/edit/${t.product_id}`,className:"flex items-center gap-1 rounded-lg border border-slate-200 px-2.5 py-1.5 text-xs font-semibold text-slate-600 hover:bg-slate-50 w-fit",children:[e.jsx(R,{className:"h-3 w-3"})," Edit"]}):t.status==="failed"?e.jsx("span",{className:"text-xs text-red-400",children:"Failed — click to retry"}):e.jsx("span",{className:"text-xs text-slate-400",children:"Processing..."})})]},t.id)})})]})]}),I&&e.jsx(ge,{submission:I,onClose:()=>r(null),onRefresh:k})]})}export{Fe as default};

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.