1import{d as C,b,i,z as p,A as m,B as S,w as y,f as e,p as f,s as z,v as B,M as V,o as r,F as h,j as k,g as a,k as x,n as w,e as D,H as _,J as M}from"./translations-C7gOHh1r.js";import{_ as O}from"./ConsoleLayout.vue_vue_type_script_setup_true_lang-DBtb7fp3.js";import"./DropdownLink.vue_vue_type_script_setup_true_lang-DJVfupbK.js";import"./useTheme-DlSnwI_s.js";const F={class:"flex items-center gap-4"},H={class:"text-sm text-gray-500"},K={class:"rounded-xl bg-dark-700 p-4 ring-1 ring-white/5 mb-6"},L={class:"grid gap-4 sm:grid-cols-4"},P={class:"rounded-xl bg-dark-700 ring-1 ring-white/5 overflow-hidden"},Z={class:"w-full"},N={class:"divide-y divide-white/5"},T={class:"px-4 py-4"},E={class:"text-sm font-medium text-white"},U={key:0,class:"text-xs text-gray-500"},$={key:1,class:"text-xs text-red-400 mt-1"},A={class:"px-4 py-4"},J={class:"px-4 py-4 text-sm text-gray-400"},R={class:"px-4 py-4 text-sm text-gray-400"},q={class:"px-4 py-4 text-sm text-gray-400"},G={class:"px-4 py-4 text-sm text-gray-400"},I={key:0},Q={key:0,class:"border-t border-white/5 px-4 py-3 flex items-center justify-between"},W={class:"text-sm text-gray-500"},X={class:"flex gap-1"},ae=C({__name:"Recipients",props:{campaign:{},recipients:{},filters:{}},setup(l){const n=l,d=b(n.filters.search||""),c=b(n.filters.status||""),g=()=>{M.get(route("console.campaigns.recipients",n.campaign.id),{status:c.value||void 0,search:d.value||void 0},{preserveState:!0,preserveScroll:!0})},j=()=>{d.value="",c.value="",M.get(route("console.campaigns.recipients",n.campaign.id))},v=o=>({pending:{label:"Äaká",class:"bg-gray-500/10 text-gray-400"},sent:{label:"Odoslané",class:"bg-blue-500/10 text-blue-400"},delivered:{label:"DoruÄené",class:"bg-green-500/10 text-green-400"},opened:{label:"Otvorené",class:"bg-purple-500/10 text-purple-400"},clicked:{label:"Kliknuté",class:"bg-indigo-500/10 text-indigo-400"},bounced:{label:"Vrátené",class:"bg-red-500/10 text-red-400"},unsubscribed:{label:"Odhlásené",class:"bg-orange-500/10 text-orange-400"},failed:{label:"Zlyhalo",class:"bg-red-500/10 text-red-400"}})[o]||{label:o,class:"bg-gray-500/10 text-gray-400"},u=o=>o?new Date(o).toLocaleString("sk-SK",{day:"2-digit",month:"2-digit",year:"numeric",hour:"2-digit",minute:"2-digit"}):"-";return(o,s)=>(r(),i(h,null,[p(m(S),{title:`PrÃjemcovia - ${l.campaign.name}`},null,8,["title"]),p(O,null,{header:y(()=>[e("div",F,[p(m(_),{href:o.route("console.campaigns.show",l.campaign.id),class:"text-gray-400 hover:text-white"},{default:y(()=>[...s[2]||(s[2]=[e("svg",{class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M10 19l-7-7m0 0l7-7m-7 7h18"})],-1)])]),_:1},8,["href"]),e("div",null,[s[3]||(s[3]=e("h1",{class:"text-xl font-semibold text-white"},"PrÃjemcovia",-1)),e("p",H,a(l.campaign.name),1)])])]),default:y(()=>[e("div",K,[e("div",L,[e("div",null,[s[4]||(s[4]=e("label",{class:"block text-xs font-medium text-gray-400 mb-1"},"HľadaÅ¥",-1)),f(e("input",{"onUpdate:modelValue":s[0]||(s[0]=t=>d.value=t),onKeyup:z(g,["enter"]),type:"text",placeholder:"Email...",class:"w-full rounded-lg border-0 bg-dark-600 px-3 py-2 text-sm text-white ring-1 ring-white/10 focus:ring-2 focus:ring-primary-500 placeholder:text-gray-500"},null,544),[[B,d.value]])]),e("div",null,[s[6]||(s[6]=e("label",{class:"block text-xs font-medium text-gray-400 mb-1"},"Status",-1)),f(e("select",{"onUpdate:modelValue":s[1]||(s[1]=t=>c.value=t),onChange:g,class:"w-full rounded-lg border-0 bg-dark-600 px-3 py-2 text-sm text-white ring-1 ring-white/10 focus:ring-2 focus:ring-primary-500"},[...s[5]||(s[5]=[e("option",{value:""},"VÅ¡etky",-1),e("option",{value:"pending"},"Äaká",-1),e("option",{value:"sent"},"Odoslané",-1),e("option",{value:"delivered"},"DoruÄené",-1),e("option",{value:"opened"},"Otvorené",-1),e("option",{value:"clicked"},"Kliknuté",-1),e("option",{value:"bounced"},"Vrátené",-1),e("option",{value:"failed"},"Zlyhalo",-1)])],544),[[V,c.value]])]),e("div",{class:"flex items-end gap-2 sm:col-span-2"},[e("button",{onClick:g,class:"rounded-lg bg-primary-500 px-4 py-2 text-sm font-medium text-white hover:bg-primary-600"}," FiltrovaÅ¥ "),e("button",{onClick:j,class:"rounded-lg bg-dark-600 px-4 py-2 text-sm font-medium text-gray-400 ring-1 ring-white/10 hover:bg-dark-500 hover:text-white"}
1," ZruÅ¡iÅ¥ ")])])]),e("div",P,[e("table",Z,[s[8]||(s[8]=e("thead",{class:"border-b border-white/5"},[e("tr",null,[e("th",{class:"px-4 py-3 text-left text-xs font-medium text-gray-400 uppercase tracking-wide"},"PrÃjemca"),e("th",{class:"px-4 py-3 text-left text-xs font-medium text-gray-400 uppercase tracking-wide"},"Status"),e("th",{class:"px-4 py-3 text-left text-xs font-medium text-gray-400 uppercase tracking-wide"},"Odoslané"),e("th",{class:"px-4 py-3 text-left text-xs font-medium text-gray-400 uppercase tracking-wide"},"DoruÄené"),e("th",{class:"px-4 py-3 text-left text-xs font-medium text-gray-400 uppercase tracking-wide"},"Otvorené"),e("th",{class:"px-4 py-3 text-left text-xs font-medium text-gray-400 uppercase tracking-wide"},"Kliknuté")])],-1)),e("tbody",N,[(r(!0),i(h,null,k(l.recipients.data,t=>(r(),i("tr",{key:t.id,class:"hover:bg-dark-600/50"},[e("td",T,[e("div",E,a(t.email),1),t.name?(r(),i("div",U,a(t.name),1)):x("",!0),t.error_message?(r(),i("div",$,a(t.error_message),1)):x("",!0)]),e("td",A,[e("span",{class:w(["inline-flex px-2 py-0.5 rounded text-xs font-medium",v(t.status).class])},a(v(t.status).label),3)]),e("td",J,a(u(t.sent_at)),1),e("td",R,a(u(t.delivered_at)),1),e("td",q,a(u(t.opened_at)),1),e("td",G,a(u(t.clicked_at)),1)]))),128)),l.recipients.data.length===0?(r(),i("tr",I,[...s[7]||(s[7]=[e("td",{colspan:"6",class:"px-4 py-12 text-center text-gray-500"},[e("svg",{class:"mx-auto h-12 w-12 text-gray-600 mb-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0zm6 3a2 2 0 11-4 0 2 2 0 014 0zM7 10a2 2 0 11-4 0 2 2 0 014 0z"})]),e("p",{class:"text-lg font-medium text-white mb-1"},"Žiadni prÃjemcovia"),e("p",{class:"text-sm"},"Pre túto kampaÅ zatiaľ nie sú žiadni prÃjemcovia.")],-1)])])):x("",!0)])]),l.recipients.last_page>1?(r(),i("div",Q,[e("div",W," Zobrazených "+a(l.recipients.data.length)+" z "+a(l.recipients.total),1),e("div",X,[(r(!0),i(h,null,k(l.recipients.links,t=>(r(),D(m(_),{key:t.label,href:t.url||"#",class:w(["px-3 py-1 rounded text-sm",t.active?"bg-primary-500 text-white":t.url?"bg-dark-600 text-gray-400 hover:bg-dark-500 hover:text-white":"bg-dark-600/50 text-gray-600 cursor-not-allowed"]),innerHTML:t.label},null,8,["href","class","innerHTML"]))),128))])])):x("",!0)])]),_:1})],64))}});export{ae 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.