1import{u as i,j as e,L as d}from"./vendor-react-ff_kKGjF.js";import{c}from"./app--xwA6v7e.js";import{ListingLinks as g}from"./ListingLinks-C-qQLfaq.js";/* empty css */function v({listing:r}){const{translations:t,routes:n}=i().props,o=r.type==="draft";return e.jsxs("div",{className:"bg-white rounded-lg border border-gray-200 overflow-hidden",children:[e.jsxs("div",{className:"aspect-video bg-gray-100 relative",children:[r.image?e.jsx("img",{src:r.image,alt:"",className:"w-full h-full object-cover"}):e.jsx("div",{className:"w-full h-full flex items-center justify-center",children:e.jsx(b,{className:"w-12 h-12 text-gray-300"})}),e.jsx("div",{className:"absolute top-2 right-2",children:e.jsx(p,{status:r.status})})]}),e.jsxs("div",{className:"p-4",children:[e.jsx("h3",{className:"font-medium text-gray-900 truncate",children:r.title}),r.location&&e.jsx("p",{className:"text-sm text-gray-500 mt-1 truncate",children:r.location}),!o&&r.impressions!==null&&e.jsxs("div",{className:"flex items-center gap-4 mt-3 text-xs text-gray-500",children:[e.jsxs("span",{children:[r.views," ",t.DASHBOARD_VIEWS.toLowerCase()]}),e.jsxs("span",{children:[r.clicks," ",t.DASHBOARD_CALLS.toLowerCase()]})]}),e.jsxs("div",{className:"mt-3 flex items-center justify-between",children:[r.package_names&&r.package_names.length>0&&e.jsx("div",{className:"flex flex-wrap gap-1",children:r.package_names.map((a,s)=>e.jsxs("span",{title:a.expiring_soon?t.EXPIRES_SOON:void 0,className:"inline-flex items-center gap-1 px-2 py-0.5 text-xs font-medium rounded-full bg-gray-100 text-gray-700",children:[a.expiring_soon&&e.jsx("svg",{className:"w-3 h-3 text-amber-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})}),a.name]},s))}),r.expiring_soon&&r.days_until_expiry!==null&&e.jsx("span",{className:"text-xs text-orange-600",children:r.days_until_expiry===1?t.EXPIRES_IN_DAY:t.EXPIRES_IN_DAYS.replace(":count",String(r.days_until_expiry))})]}),e.jsx("div",{className:"mt-4 flex items-center gap-2",children:o?e.jsx(d,{href:n.ad_entry,"data-google-vignette":"false",className:"flex-1 text-center px-3 py-2 text-sm bg-primary text-white rounded-lg hover:bg-primary/90 transition-colors",children:t.CONTINUE}):e.jsxs(e.Fragment,{children:[e.jsx(d,{href:`/dashboard/manage-ads/${r.id}/edit`,className:"flex-1 text-center px-3 py-2 text-sm bg-gray-100 text-gray-700 rounded-lg hover:bg-gray-200 transition-colors",children:t.DASHBOARD_EDIT}),e.jsx(g,{listing:r,className:"flex items-center gap-1",linkClassName:"px-3 py-2 text-sm text-gray-500 hover:text-gray-700"})]})})]})]})}const h={Published:"PUBLISHED",Draft:"DRAFT",Pending:"DASHBOARD_STATUS_IN_REVIEW",Paused:"PAUSED",Rejected:"REJECTED",Cancelled:"CANCELLED",Inactive:"INACTIVE",Failed:"DASHBOARD_STATUS_PAYMENT_FAILED"};function p({status:r,size:t="sm"}){const{translations:n}=i().props,a={Published:{bg:"bg-green-50",text:"text-green-700",border:"border-green-200",icon:"M5 13l4 4L19 7"},Pending:{bg:"bg-amber-50",text:"text-amber-700",border:"border-amber-200",icon:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"},Draft:{bg:"bg-gray-50",text:"text-gray-600",border:"border-gray-200",icon:"M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"},Paused:{bg:"bg-orange-50",text:"text-orange-700",border:"border-orange-200",icon:"M10 9v6m4-6v6m7-3a9 9 0 11-18 0 9 9 0 0118 0z"},Rejected:{bg:"bg-red-50",text:"text-red-700",border:"border-red-200",icon:"M6 18L18 6M6 6l12 12"},Cancelled:{bg:"bg-red-50",text:"text-red-600",border:"border-red-200",icon:"M18.364 18.364A9 9 0 005.636 5.636m12.728 12.728A9 9 0 015.636 5.636m12.728 12.728L5.636 5.636"},Failed:{bg:"bg-red-50",text:"text-red-700",border:"border-red-200",icon:"M3 10h18M5 6h14a2 2 0 012 2v8a2 2 0 01-2 2H5a2 2 0 01-2-2V8a2 2 0 012-2z"}}[r]||{bg:"bg-gray-50",text:"text-gray-600",border:"border-gray-200",icon:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"},s=h[r],l=s&&n[s]||r,x=t==="md"?"px-3 py-1.5 text-sm gap-2":"px-2 py-1 text-xs gap-1.5",m=t==="md"?"w-4 h-4":"w-3.5 h-3.5";return e.jsxs("span",{className:c("inline-flex items-center font-medium rounded-full border",a.bg,a.text,a.border,x),children:[e.jsx("svg",{className:c(m,"shrink-0"),fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:a.icon})}),l]})}function b({className:r}){return e.jsx("svg",{className:r,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})})}export{v as ListingCard,p as StatusBadge,h as statusTranslationKeys};
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.