import{j as e,H as l,L as r}from"./app-BRoRPa4x.js";import{A as a}from"./AdminLayout-DCcA2Aje.js";import"./Dropdown-B4bpLCgK.js";import"./transition-u43f5Dc-.js";import"./proxy-iYr3ghlA.js";import"./sweetalert2.esm.all-UgF8mXO5.js";import"./ChevronRightIcon-BDYMGWwz.js";function h({galleries:t}){return e.jsxs(a,{children:[e.jsx(l,{title:"Gallery Management"}),e.jsx("div",{className:"py-8 px-4 sm:px-6 lg:px-8",children:e.jsxs("div",{className:"max-w-7xl mx-auto",children:[e.jsxs("div",{className:"mb-8 text-center",children:[e.jsx("h1",{className:"text-3xl font-bold text-gray-900 mb-2",children:"Gallery Management"}),e.jsx("p",{className:"text-gray-600 max-w-2xl mx-auto",children:"Manage your organization's visual assets. Add, edit, or remove gallery items to maintain an up-to-date portfolio."})]}),e.jsxs("div",{className:"flex justify-between items-center mb-6 p-4 bg-gray-50 rounded-lg",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-lg font-medium text-gray-900",children:"Gallery Items"}),e.jsxs("p",{className:"text-sm text-gray-500",children:[t.length," ",t.length===1?"item":"items"," in your gallery"]})]}),e.jsxs(r,{href:route("admin.gallery.create"),className:"inline-flex items-center px-4 py-2 border border-transparent text-sm font-medium rounded-md shadow-sm text-white bg-blue-600 hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 transition-colors duration-200",children:[e.jsx("svg",{className:"-ml-1 mr-2 h-5 w-5",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",children:e.jsx("path",{fillRule:"evenodd",d:"M10 3a1 1 0 011 1v5h5a1 1 0 110 2h-5v5a1 1 0 11-2 0v-5H4a1 1 0 110-2h5V4a1 1 0 011-1z",clipRule:"evenodd"})}),"Add New Item"]})]}),e.jsx("div",{className:"bg-white shadow overflow-hidden sm:rounded-md",children:t.length>0?e.jsx("ul",{className:"divide-y divide-gray-200",children:t.map(s=>e.jsx("li",{className:"hover:bg-gray-50 transition-colors duration-150",children:e.jsx("div",{className:"px-4 py-4 sm:px-6",children:e.jsxs("div",{className:"flex items-center",children:[e.jsxs("div",{className:"min-w-0 flex-1 flex items-center",children:[e.jsx("div",{className:"flex-shrink-0",children:e.jsx("img",{className:"h-16 w-16 rounded-lg object-cover",src:s.url,alt:s.title})}),e.jsx("div",{className:"min-w-0 flex-1 px-4",children:e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-medium text-blue-600 truncate",children:s.title}),e.jsx("p",{className:"mt-1 text-sm text-gray-500",children:s.description})]})})]}),e.jsxs("div",{className:"ml-4 flex-shrink-0 flex space-x-3",children:[e.jsx(r,{href:route("admin.gallery.edit",s.id),className:"inline-flex items-center px-3 py-1 border border-gray-300 shadow-sm text-sm font-medium rounded-md text-gray-700 bg-white hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500",children:"Edit"}),e.jsx(r,{href:route("admin.gallery.destroy",s.id),method:"delete",as:"button",className:"inline-flex items-center px-3 py-1 border border-transparent text-sm font-medium rounded-md text-white bg-red-600 hover:bg-red-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500",children:"Delete"})]})]})})},s.id))}):e.jsxs("div",{className:"text-center py-12",children:[e.jsx("svg",{className:"mx-auto h-12 w-12 text-gray-400",xmlns:"http://www.w3.org/2000/svg",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"})}),e.jsx("h3",{className:"mt-2 text-sm font-medium text-gray-900",children:"No gallery items"}),e.jsx("p",{className:"mt-1 text-sm text-gray-500",children:"Get started by creating a new gallery item."}),e.jsx("div",{className:"mt-6",children:e.jsxs(r,{href:route("admin.gallery.create"),className:"inline-flex items-center px-4 py-2 border border-transparent shadow-sm text-sm font-medium rounded-md text-white bg-blue-600 hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500",children:[e.jsx("svg",{className:"-ml-1 mr-2 h-5 w-5",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",children:e.jsx("path",{fillRule:"evenodd",d:"M10 3a1 1 0 011 1v5h5a1 1 0 110 2h-5v5a1 1 0 11-2 0v-5H4a1 1 0 110-2h5V4a1 1 0 011-1z",clipRule:"evenodd"})}),"Add First Item"]})})]})})]})})]})}export{h as default};
