import{d as C,c as B,P as L,e as b,S as E,K as G,al as H,am as U,T as j,o as P,q as k,a9 as q,B as M,an as F,ao as R,ap as V,aq as Y,ar as Z,as as J,at as K,au as Q,av as X,aw as W,ax as $}from"./index-DT-X9ySe.js";import{j as e}from"./ui-vendor-Cn57k9R1.js";import{r as o}from"./react-vendor-B9tfxWGs.js";import{I as ee}from"./input-DSW3IQ5Z.js";import{C as z}from"./checkbox-s3CrKDPd.js";import{U as te}from"./upload-DyWnrTJq.js";import{L as se}from"./list-CTIwL6TD.js";import{T as f}from"./trash-2-CN1LVg1V.js";import"./query-vendor-BGnEs3s8.js";import"./charts-vendor-DecUTkfU.js";import"./editor-vendor-BA3QzDsK.js";/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const h=C("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const oe=C("Grid3x3",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M3 15h18",key:"5xshup"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"M15 3v18",key:"14nvp0"}]]),ae="/assets/boaze-farms-AX8RF1l3.png",re=Object.freeze(Object.defineProperty({__proto__:null,default:ae},Symbol.toStringTag,{value:"Module"})),le="/assets/cedarville-2-DOolwa-c.png",ne=Object.freeze(Object.defineProperty({__proto__:null,default:le},Symbol.toStringTag,{value:"Module"})),ie="/assets/cedarville-3-B3WxAlvr.png",ce=Object.freeze(Object.defineProperty({__proto__:null,default:ie},Symbol.toStringTag,{value:"Module"})),de="/assets/boaze-palm-field-3Hl-8rAa.jpeg",pe=Object.freeze(Object.defineProperty({__proto__:null,default:de},Symbol.toStringTag,{value:"Module"})),_e="/assets/castle-hills-gardens-1-a6Aga6QM.jpg",ge=Object.freeze(Object.defineProperty({__proto__:null,default:_e},Symbol.toStringTag,{value:"Module"})),ue="/assets/castle-hills-gardens-2-DUDLIM0N.jpg",me=Object.freeze(Object.defineProperty({__proto__:null,default:ue},Symbol.toStringTag,{value:"Module"})),be="/assets/castle-hills-gardens-3-D5bBbDtK.jpg",je=Object.freeze(Object.defineProperty({__proto__:null,default:be},Symbol.toStringTag,{value:"Module"})),fe="/assets/castle-hills-gardens-4-CqcYGu4O.jpg",he=Object.freeze(Object.defineProperty({__proto__:null,default:fe},Symbol.toStringTag,{value:"Module"})),xe="/assets/castle-hills-gardens-5-BnP0JzkL.jpg",ve=Object.freeze(Object.defineProperty({__proto__:null,default:xe},Symbol.toStringTag,{value:"Module"})),ye="/assets/castle-hills-gardens-6-CIBzHCPs.jpg",Se=Object.freeze(Object.defineProperty({__proto__:null,default:ye},Symbol.toStringTag,{value:"Module"})),Ne="/assets/cedarville-park-1-D-8R8XDA.jpg",Oe=Object.freeze(Object.defineProperty({__proto__:null,default:Ne},Symbol.toStringTag,{value:"Module"})),we="/assets/cedarville-park-1b-CE7CB6C-.jpg",Pe=Object.freeze(Object.defineProperty({__proto__:null,default:we},Symbol.toStringTag,{value:"Module"})),ke="/assets/cedarville-park-1c-DZox3KLh.jpg",Me=Object.freeze(Object.defineProperty({__proto__:null,default:ke},Symbol.toStringTag,{value:"Module"})),ze="/assets/cedarville-park-2-photo-2-B9rLfZt8.jpg",Ce=Object.freeze(Object.defineProperty({__proto__:null,default:ze},Symbol.toStringTag,{value:"Module"})),Te="/assets/cedarville-park-2-photo-DyTGt60E.jpg",De=Object.freeze(Object.defineProperty({__proto__:null,default:Te},Symbol.toStringTag,{value:"Module"})),Ie="/assets/cedarville-park-3-sOo0YoUC.jpeg",Ae=Object.freeze(Object.defineProperty({__proto__:null,default:Ie},Symbol.toStringTag,{value:"Module"})),Be="/assets/inspection-team-1-7J3rb81E.jpg",Le=Object.freeze(Object.defineProperty({__proto__:null,default:Be},Symbol.toStringTag,{value:"Module"})),Ee="/assets/inspection-team-2-BuxDm5f8.jpg",Ge=Object.freeze(Object.defineProperty({__proto__:null,default:Ee},Symbol.toStringTag,{value:"Module"})),He="/assets/oakland-estate-1-C9zjYlfg.jpg",Ue=Object.freeze(Object.defineProperty({__proto__:null,default:He},Symbol.toStringTag,{value:"Module"})),qe="/assets/wealth-residence-1-BQVzxVR9.jpg",Fe=Object.freeze(Object.defineProperty({__proto__:null,default:qe},Symbol.toStringTag,{value:"Module"})),Re="/assets/emmanuel-oluwayomi-CGlps2EU.jpeg",Ve=Object.freeze(Object.defineProperty({__proto__:null,default:Re},Symbol.toStringTag,{value:"Module"})),Ye="/assets/jessica-norman-DLI9uTTB.jpeg",Ze=Object.freeze(Object.defineProperty({__proto__:null,default:Ye},Symbol.toStringTag,{value:"Module"})),Je="/assets/kennedy-emeh-BIYUQyqE.jpeg",Ke=Object.freeze(Object.defineProperty({__proto__:null,default:Je},Symbol.toStringTag,{value:"Module"})),Qe="/assets/ozoh-elijah-esse-CTqaMZJM.jpeg",Xe=Object.freeze(Object.defineProperty({__proto__:null,default:Qe},Symbol.toStringTag,{value:"Module"})),We="/assets/precious-anuoluwapo-CAqixHD1.jpeg",$e=Object.freeze(Object.defineProperty({__proto__:null,default:We},Symbol.toStringTag,{value:"Module"})),et="/assets/rukayat-olabisi-omotosho-CjayMWFC.jpeg",tt=Object.freeze(Object.defineProperty({__proto__:null,default:et},Symbol.toStringTag,{value:"Module"})),st="/assets/samuel-aderibigbe-CfdZ2crx.jpeg",ot=Object.freeze(Object.defineProperty({__proto__:null,default:st},Symbol.toStringTag,{value:"Module"})),at=Object.assign({"/src/assets/boaze-logo.png":F,"/src/assets/inspection-11.jpg":R,"/src/assets/inspection-12.jpg":V,"/src/assets/inspection-13.jpg":Y,"/src/assets/inspection-14.jpg":Z,"/src/assets/logos/boaze-farms.png":re,"/src/assets/logos/cedarville-2.png":ne,"/src/assets/logos/cedarville-3.png":ce,"/src/assets/properties/boaze-palm-field.jpeg":pe,"/src/assets/properties/castle-hills-gardens-1.jpg":ge,"/src/assets/properties/castle-hills-gardens-2.jpg":me,"/src/assets/properties/castle-hills-gardens-3.jpg":je,"/src/assets/properties/castle-hills-gardens-4.jpg":he,"/src/assets/properties/castle-hills-gardens-5.jpg":ve,"/src/assets/properties/castle-hills-gardens-6.jpg":Se,"/src/assets/properties/cedarville-park-1.jpg":Oe,"/src/assets/properties/cedarville-park-1b.jpg":Pe,"/src/assets/properties/cedarville-park-1c.jpg":Me,"/src/assets/properties/cedarville-park-2-photo-2.jpg":Ce,"/src/assets/properties/cedarville-park-2-photo.jpg":De,"/src/assets/properties/cedarville-park-3.jpeg":Ae,"/src/assets/properties/inspection-team-1.jpg":Le,"/src/assets/properties/inspection-team-2.jpg":Ge,"/src/assets/properties/oakland-estate-1.jpg":Ue,"/src/assets/properties/wealth-residence-1.jpg":Fe,"/src/assets/team-photo-1.jpg":J,"/src/assets/team-photo-2.jpg":K,"/src/assets/team-photo-3.jpg":Q,"/src/assets/team-photo-4.jpg":X,"/src/assets/team-photo-5.jpg":W,"/src/assets/team-photo-6.jpg":$,"/src/assets/team/emmanuel-oluwayomi.jpeg":Ve,"/src/assets/team/jessica-norman.jpeg":Ze,"/src/assets/team/kennedy-emeh.jpeg":Ke,"/src/assets/team/ozoh-elijah-esse.jpeg":Xe,"/src/assets/team/precious-anuoluwapo.jpeg":$e,"/src/assets/team/rukayat-olabisi-omotosho.jpeg":tt,"/src/assets/team/samuel-aderibigbe.jpeg":ot}),rt=()=>Object.entries(at).map(([l,n],c)=>{const a=l.split("/").pop()||`file-${c}`;return{id:String(c+1),name:a,type:"image",url:n.default}}),jt=()=>{const l=o.useMemo(rt,[]),[n,c]=o.useState(""),[a,x]=o.useState("grid"),[_,T]=o.useState("All"),[v,D]=o.useState([]),[y,d]=o.useState(null),[p,g]=o.useState(1),[i,S]=o.useState(12),{toast:I}=B(),N=l.filter(t=>!(_==="Images"&&t.type!=="image"||_==="Documents"&&t.type!=="document"||n&&!t.name.toLowerCase().includes(n.toLowerCase()))),O=Math.max(1,Math.ceil(N.length/i)),u=N.slice((p-1)*i,p*i),r=y?l.find(t=>t.id===y):null,w=t=>D(s=>s.includes(t)?s.filter(A=>A!==t):[...s,t]),m=t=>{navigator.clipboard.writeText(window.location.origin+t),I({title:"Copied!",description:"URL copied to clipboard"})};return e.jsxs("div",{className:"space-y-6",children:[e.jsx(L,{title:"Media Library",count:l.length}),e.jsxs("div",{className:"border-2 border-dashed border-primary/30 rounded-xl p-8 flex flex-col items-center gap-3 cursor-pointer hover:border-primary/50 transition-colors bg-card",children:[e.jsx(te,{className:"w-10 h-10 text-primary/50"}),e.jsx("p",{className:"text-sm font-medium text-foreground font-body",children:"Drag images here or click to upload"}),e.jsx("p",{className:"text-xs text-muted-foreground font-body",children:"Accepts: jpg, png, webp (max 5MB each)"})]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[e.jsxs("div",{className:"flex gap-1 bg-muted rounded-lg p-0.5",children:[e.jsx("button",{onClick:()=>x("grid"),className:b("p-2 rounded-md transition-colors",a==="grid"?"bg-card shadow-sm":"text-muted-foreground hover:text-foreground"),children:e.jsx(oe,{className:"w-4 h-4"})}),e.jsx("button",{onClick:()=>x("list"),className:b("p-2 rounded-md transition-colors",a==="list"?"bg-card shadow-sm":"text-muted-foreground hover:text-foreground"),children:e.jsx(se,{className:"w-4 h-4"})})]}),e.jsx("div",{className:"flex gap-1",children:["All","Images","Documents"].map(t=>e.jsx("button",{onClick:()=>{T(t),g(1)},className:b("px-3 py-1.5 text-sm rounded-lg font-body transition-colors",_===t?"bg-primary/10 text-primary font-medium":"text-muted-foreground hover:bg-muted/50"),children:t},t))}),e.jsxs("div",{className:"relative w-[240px] ml-auto",children:[e.jsx(E,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground"}),e.jsx(ee,{placeholder:"Search files...",value:n,onChange:t=>c(t.target.value),className:"pl-9"})]})]}),a==="grid"?e.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 gap-4",children:u.length===0?e.jsx("div",{className:"col-span-full",children:e.jsx(G,{icon:H,title:"No files found",subtitle:"Upload your first file"})}):u.map(t=>e.jsxs("div",{className:"group relative bg-card rounded-xl border border-border overflow-hidden cursor-pointer hover:shadow-md transition-all",onClick:()=>d(t.id),children:[e.jsxs("div",{className:"aspect-square bg-muted relative overflow-hidden",children:[e.jsx("img",{src:t.url,alt:t.name,className:"w-full h-full object-cover"}),e.jsxs("div",{className:"absolute inset-0 bg-foreground/50 opacity-0 group-hover:opacity-100 transition-opacity flex items-center justify-center",children:[e.jsx("button",{onClick:s=>{s.stopPropagation(),w(t.id)},className:"absolute top-2 left-2 w-6 h-6 rounded bg-card/90 flex items-center justify-center",children:v.includes(t.id)?e.jsx(U,{className:"w-4 h-4 text-primary"}):e.jsx("div",{className:"w-3.5 h-3.5 rounded-sm border border-foreground/50"})}),e.jsx("button",{onClick:s=>{s.stopPropagation(),m(t.url)},className:"absolute bottom-2 left-2 p-1.5 rounded bg-card/90 text-foreground hover:bg-card",children:e.jsx(h,{className:"w-4 h-4"})}),e.jsx("button",{onClick:s=>{s.stopPropagation()},className:"absolute bottom-2 right-2 p-1.5 rounded bg-card/90 text-destructive hover:bg-card",children:e.jsx(f,{className:"w-4 h-4"})})]})]}),e.jsx("div",{className:"p-3",children:e.jsx("p",{className:"text-sm font-medium text-foreground font-body truncate",children:t.name})})]},t.id))}):e.jsxs("div",{className:"bg-card rounded-xl border border-border overflow-hidden",children:[e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b",children:[e.jsx("th",{className:"w-10 px-4 py-3",children:e.jsx(z,{})}),e.jsx(j,{children:"Thumb"}),e.jsx(j,{children:"Filename"}),e.jsx(j,{children:"Actions"})]})}),e.jsx("tbody",{children:u.map(t=>e.jsxs("tr",{className:"border-b border-border/50 hover:bg-muted/30 transition-colors duration-150",children:[e.jsx("td",{className:"w-10 px-4 py-3",children:e.jsx(z,{checked:v.includes(t.id),onCheckedChange:()=>w(t.id)})}),e.jsx(P,{children:e.jsx("div",{className:"w-10 h-10 rounded bg-muted overflow-hidden",children:e.jsx("img",{src:t.url,alt:"",className:"w-full h-full object-cover"})})}),e.jsx("td",{className:"px-6 py-3 text-sm font-body font-medium text-foreground cursor-pointer hover:text-primary",onClick:()=>d(t.id),children:t.name}),e.jsx(P,{children:e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("button",{onClick:()=>m(t.url),className:"p-1.5 rounded hover:bg-muted/50 text-muted-foreground hover:text-foreground",children:e.jsx(h,{className:"w-4 h-4"})}),e.jsx("button",{className:"p-1.5 rounded hover:bg-destructive/10 text-muted-foreground hover:text-destructive",children:e.jsx(f,{className:"w-4 h-4"})})]})})]},t.id))})]})}),e.jsx(k,{page:p,totalPages:O,perPage:i,onPageChange:g,onPerPageChange:S})]}),a==="grid"&&e.jsx(k,{page:p,totalPages:O,perPage:i,onPageChange:g,onPerPageChange:S}),r&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"fixed inset-0 bg-foreground/50 z-50",onClick:()=>d(null)}),e.jsxs("div",{className:"fixed inset-4 sm:inset-10 lg:inset-20 bg-card rounded-2xl z-50 flex flex-col overflow-hidden shadow-2xl",children:[e.jsxs("div",{className:"flex items-center justify-between px-6 py-4 border-b border-border",children:[e.jsx("h2",{className:"text-lg font-semibold text-foreground font-body",children:r.name}),e.jsx("button",{onClick:()=>d(null),className:"p-1.5 rounded-lg hover:bg-muted/50 text-muted-foreground",children:e.jsx(q,{className:"w-5 h-5"})})]}),e.jsx("div",{className:"flex-1 flex items-center justify-center bg-muted/30 p-8 overflow-auto",children:e.jsx("img",{src:r.url,alt:r.name,className:"max-w-full max-h-full object-contain rounded-lg"})}),e.jsxs("div",{className:"px-6 py-4 border-t border-border flex items-center justify-between flex-wrap gap-3",children:[e.jsx("p",{className:"text-sm text-muted-foreground font-body",children:r.name}),e.jsxs("div",{className:"flex gap-2",children:[e.jsxs(M,{variant:"outline",className:"font-body",onClick:()=>m(r.url),children:[e.jsx(h,{className:"w-4 h-4 mr-1"})," Copy URL"]}),e.jsxs(M,{variant:"outline",className:"text-destructive border-destructive/30 font-body",children:[e.jsx(f,{className:"w-4 h-4 mr-1"})," Delete"]})]})]})]})]})]})};export{jt as default};
