(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8905],{53311:function(e,s,a){Promise.resolve().then(a.bind(a,11061))},11061:function(e,s,a){"use strict";a.r(s),a.d(s,{default:function(){return c}});var l=a(57437),t=a(2265);function c(){let[e,s]=(0,t.useState)(["/api/uploads/estates/1756745123692-0-2150799723.jpg","/api/uploads/estates/1756745123692-1-2150799724.jpg","/api/uploads/estates/1756745123692-2-2150799725.jpg","/api/uploads/estates/test-estate-1/0","/api/uploads/estates/test-estate-1/1","/api/uploads/estates/test-estate-1/2"]),[a,c]=(0,t.useState)({}),o=e=>{c(s=>({...s,[e]:"loading"}));let s=new Image;s.onload=()=>{c(s=>({...s,[e]:"success"})),console.log("✅ Image loaded successfully:",e)},s.onerror=()=>{c(s=>({...s,[e]:"error"})),console.log("❌ Image failed to load:",e)},s.src=e};return(0,l.jsx)("div",{className:"min-h-screen bg-gradient-bg-light p-8",children:(0,l.jsxs)("div",{className:"max-w-4xl mx-auto",children:[(0,l.jsx)("h1",{className:"text-3xl font-bold mb-8",children:"Image Serving Test"}),(0,l.jsxs)("div",{className:"mb-8",children:[(0,l.jsx)("button",{onClick:()=>{e.forEach(e=>o(e))},className:"btn-primary mb-4",children:"Test All Image URLs"}),(0,l.jsx)("div",{className:"space-y-4",children:e.map((e,s)=>(0,l.jsxs)("div",{className:"flex items-center space-x-4 p-4 bg-white rounded-lg shadow",children:[(0,l.jsx)("div",{className:"flex-1",children:(0,l.jsx)("code",{className:"text-sm text-gray-800 break-all",children:e})}),(0,l.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,l.jsx)("button",{onClick:()=>o(e),className:"btn-secondary text-sm px-3 py-1",children:"Test"}),(0,l.jsx)("div",{className:"w-3 h-3 rounded-full ".concat("success"===a[e]?"bg-green-500":"error"===a[e]?"bg-red-500":"loading"===a[e]?"bg-yellow-500 animate-pulse":"bg-gray-300")}),(0,l.jsx)("span",{className:"text-sm text-gray-600",children:a[e]||"Not tested"})]})]},s))})]}),(0,l.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:e.map((e,s)=>(0,l.jsxs)("div",{className:"card-primary",children:[(0,l.jsxs)("h3",{className:"text-lg font-semibold mb-4",children:["Test Image ",s+1]}),(0,l.jsx)("div",{className:"aspect-video bg-gray-100 rounded-lg overflow-hidden",children:(0,l.jsx)("img",{src:e,alt:"Test image ".concat(s+1),className:"w-full h-full object-cover",onLoad:()=>console.log("Image loaded in component:",e),onError:a=>{console.log("Image failed in component:",e),a.target.src="https://via.placeholder.com/400x300/8B5CF6/FFFFFF?text=Failed+".concat(s+1)}})}),(0,l.jsx)("p",{className:"text-xs text-gray-500 mt-2 break-all",children:e})]},s))}),(0,l.jsxs)("div",{className:"mt-8 p-4 bg-yellow-50 border border-yellow-200 rounded-lg",children:[(0,l.jsx)("h3",{className:"font-semibold text-yellow-800 mb-2",children:"Debug Information"}),(0,l.jsx)("p",{className:"text-sm text-yellow-700",children:"Check the browser console for detailed logs about image loading. Green dots indicate successful loads, red dots indicate failures."})]})]})})}}},function(e){e.O(0,[2971,2117,1744],function(){return e(e.s=53311)}),_N_E=e.O()}]);