import{j as e,H as l,L as t,c as d}from"./app-vYFZLebK.js";import{A as o}from"./AuthenticatedLayout-dsnBHnD2.js";import{P as n}from"./ProBackground-HBykvu3f.js";import{A as c}from"./AnimatedGrid-Bf6AiAAC.js";import{M as s}from"./mail-CgMp0qFW.js";import{S as m}from"./square-pen-pYe1ouVr.js";import{T as x}from"./trash-2-BGObRuXj.js";import{S as p}from"./send-CG7otiQv.js";import{P as u}from"./plus-Df4Mh6JJ.js";import"./ThemeSwitcher-C0dt0hQX.js";import"./NotificationDropdown-hhsBJy8C.js";import"./transition-6I0c9VKA.js";import"./x-5fjm0jEE.js";function _({templates:a}){const i=r=>{confirm("Delete this template?")&&d.delete(route("admin.email.destroy",r))};return e.jsxs("div",{className:"min-h-screen bg-[var(--bg-main)] text-[var(--text-main)] transition-colors duration-300",children:[e.jsx(n,{}),e.jsxs(o,{header:e.jsxs("div",{className:"flex justify-between items-center w-full",children:[e.jsxs("div",{className:"flex items-center space-x-4",children:[e.jsx("div",{className:"p-2 bg-purple-500/10 border border-purple-500/30 rounded-lg text-purple-500",children:e.jsx(s,{size:20})}),e.jsxs("div",{className:"text-left",children:[e.jsx("h2",{className:"text-lg font-black tracking-tighter uppercase italic leading-none",children:"Mail_System"}),e.jsx("p",{className:"text-[8px] text-purple-500 uppercase tracking-[0.4em] font-bold mt-1",children:"Template Protocols"})]})]}),e.jsxs("div",{className:"flex gap-3",children:[e.jsxs(t,{href:route("admin.email.send"),className:"flex items-center px-4 py-2 bg-[var(--bg-surface)] border border-[var(--border)] rounded-lg font-black text-[10px] uppercase tracking-widest hover:text-purple-500 transition-all",children:[e.jsx(p,{className:"mr-2",size:14})," Send_Console"]}),e.jsxs(t,{href:route("admin.email.create"),className:"flex items-center px-6 py-2 bg-[var(--text-main)] text-[var(--bg-main)] rounded-lg font-black text-[10px] uppercase tracking-widest hover:bg-purple-500 hover:text-white transition-all shadow-xl",children:[e.jsx(u,{className:"mr-2",size:14,strokeWidth:3})," New_Template"]})]})]}),children:[e.jsx(l,{title:"Email Templates"}),e.jsxs("div",{className:"relative min-h-full p-8 lg:p-12 overflow-y-auto",children:[e.jsx(c,{}),e.jsx("div",{className:"max-w-7xl mx-auto relative z-10",children:e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:a.map(r=>e.jsxs("div",{className:"bg-[var(--bg-surface)] border border-[var(--border)] rounded-2xl p-6 hover:border-purple-500/50 transition-all shadow-lg group",children:[e.jsxs("div",{className:"flex justify-between items-start mb-4",children:[e.jsx("div",{className:"p-3 bg-purple-500/5 rounded-xl text-purple-500",children:e.jsx(s,{size:24})}),e.jsxs("div",{className:"flex gap-2 opacity-0 group-hover:opacity-100 transition-opacity",children:[e.jsx(t,{href:route("admin.email.edit",r.id),className:"p-2 hover:bg-purple-500/10 rounded text-[var(--text-muted)] hover:text-purple-500",children:e.jsx(m,{size:14})}),e.jsx("button",{onClick:()=>i(r.id),className:"p-2 hover:bg-rose-500/10 rounded text-[var(--text-muted)] hover:text-rose-500",children:e.jsx(x,{size:14})})]})]}),e.jsx("h3",{className:"text-lg font-bold mb-1",children:r.name}),e.jsx("p",{className:"text-xs text-[var(--text-muted)] mb-4 truncate",children:r.subject}),e.jsxs("div",{className:"text-[10px] font-mono bg-[var(--bg-elevated)] p-2 rounded border border-[var(--border)] text-[var(--text-muted)]",children:["ID: ",r.id," | Last Sync: ",new Date(r.updated_at).toLocaleDateString()]})]},r.id))})})]})]})]})}export{_ as default};
