1import{g,r as u,i as v,c as a,a as h,b as e,d,h as y,j as k,v as E,k as F,F as c,m as x,t as r,o as s,w as m,e as f,l as p,q as b,p as C}from"./app-CYJblVnV.js";import{_ as j}from"./AdminLayout-DFSGaIHT.js";import{d as V}from"./debounce-DnP-YU6Q.js";const B={class:"bg-white border border-[#E5E5E5] mb-6 p-4"},D={class:"bg-white border border-[#E5E5E5] overflow-hidden"},O={class:"min-w-full divide-y divide-[#E5E5E5]"},S={class:"bg-white divide-y divide-[#E5E5E5]"},N={class:"px-6 py-4"},T={class:"text-sm text-black"},H={class:"px-6 py-4 whitespace-nowrap"},L={class:"flex items-center"},M={class:"flex-shrink-0 h-8 w-8"},A={class:"h-8 w-8 bg-[#E5E5E5] overflow-hidden"},K=["src","alt"],U={key:1,class:"h-full w-full flex items-center justify-center bg-black text-white text-xs font-bold"},$={class:"px-6 py-4 whitespace-nowrap"},q={key:1,class:"text-sm text-[#999999]"},z={class:"px-6 py-4 whitespace-nowrap text-sm text-[#999999]"},I={class:"px-6 py-4 whitespace-nowrap text-right text-sm font-medium"},G=["onClick"],J={key:0,class:"px-6 py-4 border-t border-[#E5E5E5] flex items-center justify-between"},P={class:"text-sm text-[#999999]"},Q={class:"flex gap-2"},ee=Object.assign({layout:j},{__name:"Index",props:{comments:Object,filters:Object},setup(l){const o=g(l.filters.search||""),_=V(()=>{u.get(route("admin.comments.index"),{search:o.value||void 0},{preserveState:!0,replace:!0})},300);v(o,_);const w=i=>{confirm("Er du sikker på at du vil slette denne kommentar?")&&u.delete(route("admin.comments.destroy",i.id))};return(i,n)=>(s(),a(c,null,[h(d(y),{title:"Kommentarer - Admin"}),e("div",B,[k(e("input",{"onUpdate:modelValue":n[0]||(n[0]=t=>o.value=t),type:"text",placeholder:"Søg i kommentarer...",class:"w-full border-[#E5E5E5] focus:border-black focus:ring-black"},null,512),[[E,o.value]])]),e("div",D,[e("table",O,[n[1]||(n[1]=e("thead",{class:"bg-[#F5F5F5]"},[e("tr",null,[e("th",{class:"px-6 py-3 text-left font-label text-[0.65rem] font-semibold text-[#999999] uppercase tracking-widest"}," Kommentar "),e("th",{class:"px-6 py-3 text-left font-label text-[0.65rem] font-semibold text-[#999999] uppercase tracking-widest"}," Bruger "),e("th",{class:"px-6 py-3 text-left font-label text-[0.65rem] font-semibold text-[#999999] uppercase tracking-widest"}," Opslag "),e("th",{class:"px-6 py-3 text-left font-label text-[0.65rem] font-semibold text-[#999999] uppercase tracking-widest"}," Oprettet "),e("th",{class:"px-6 py-3 text-right font-label text-[0.65rem] font-semibold text-[#999999] uppercase tracking-widest"}," Handlinger ")])],-1)),e("tbody",S,[(s(!0),a(c,null,x(l.comments.data,t=>(s(),a("tr",{key:t.id},[e("td",N,[e("p",T,r(t.content),1)]),e("td",H,[e("div",L,[e("div",M,[e("div",A,[t.user.image?(s(),a("img",{key:0,src:t.user.image,alt:t.user.name,class:"h-full w-full object-cover"},null,8,K)):(s(),a("div",U,r(t.user.name.charAt(0).toUpperCase()),1))])]),h(d(p),{href:i.route("admin.users.show",t.user.id),class:"ml-2 text-sm text-[#555555] hover:text-[#DC2626]"},{default:m(()=>[f(r(t.user.name),1)]),_:2},1032,["href"])])]),e("td",$,[t.post?(s(),b(d(p),{key:0,href:i.route("admin.posts.show",t.post.id),class:"text-sm text-[#999999] hover:text-[#DC2626]"},{default:m(()=>[f(r(t.post.content),1)]),_:2},1032,["href"])):(s(),a("span",q,"Slettet"))]),e("td",z,r(t.created_at),1),e("td",I,[e("button",{onClick:W=>w(t),class:"text-red-600 hover:text-red-900"}," Slet ",8,G)])]))),128))])]),l.comments.last_page>1?(s(),a("div",J,[e("div",P," Viser "+r(l.comments.from)+" til "+r(l.comments.to)+" af "+r(l.comments.total)+" kommentarer ",1),e("div",Q,[(s(!0),a(c,null,x(l.comments.links,t=>(s(),b(d(p),{key:t.label,href:t.url||"#",class:C(["px-3 py-1 text-sm",t.active?"bg-black text-white border-black":"bg-[#F5F5F5] text-[#555555] hover:bg-[#E5E5E5]",!t.url&&"opacity-50 cursor-not-allowed"]),innerHTML:t.label},null,8,["href","class","innerHTML"]))),128))])])):F("",!0)])],64))}});export{ee 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.