<turbo-stream action="update" target="mall-map-wrapper"><template><div data-controller="photo" id="mall-photos" itemscope="" itemtype="https://schema.org/ImageGallery"><div class="carousel slide carousel-fade" data-bs-interval="false" data-bs-ride="false" data-bs-touch="true" data-bs-wrap="true" id="main-slide"><div class="carousel-inner"><div class="carousel-item active"><img class="d-block w-100 photo-enlargeable cursor-pointer" alt="Plaza David Norte - Gallery Photo 1" title="Plaza David Norte - Gallery Photo 1" itemprop="image" width="1200" height="800" srcset="https://getoccupi.com/cdn-cgi/image/width=600,quality=85,format=auto/https://static.getoccupi.com/uploads/mall_photo/photo/61439/leftc.jpg 600w, https://getoccupi.com/cdn-cgi/image/width=900,quality=85,format=auto/https://static.getoccupi.com/uploads/mall_photo/photo/61439/leftc.jpg 900w, https://getoccupi.com/cdn-cgi/image/width=1200,quality=85,format=auto/https://static.getoccupi.com/uploads/mall_photo/photo/61439/leftc.jpg 1200w" sizes="(max-width: 768px) 100vw, 66vw" fetchpriority="high" loading="eager" decoding="auto" data-action="click-&gt;photo#enlargePhoto" data-photo-url="https://static.getoccupi.com/uploads/mall_photo/photo/61439/leftc.jpg" src="https://getoccupi.com/cdn-cgi/image/width=900,quality=85,format=auto/https://static.getoccupi.com/uploads/mall_photo/photo/61439/leftc.jpg" /></div><div class="carousel-item"><img class="d-block w-100 photo-enlargeable cursor-pointer" alt="Plaza David Norte - Gallery Photo 2" title="Plaza David Norte - Gallery Photo 2" itemprop="image" width="1200" height="800" srcset="https://getoccupi.com/cdn-cgi/image/width=600,quality=85,format=auto/https://static.getoccupi.com/uploads/mall_photo/photo/61440/8aac66c510c2aa61dcd675d31b2cf854221e67fc-1600x1066.jpg 600w, https://getoccupi.com/cdn-cgi/image/width=900,quality=85,format=auto/https://static.getoccupi.com/uploads/mall_photo/photo/61440/8aac66c510c2aa61dcd675d31b2cf854221e67fc-1600x1066.jpg 900w, https://getoccupi.com/cdn-cgi/image/width=1200,quality=85,format=auto/https://static.getoccupi.com/uploads/mall_photo/photo/61440/8aac66c510c2aa61dcd675d31b2cf854221e67fc-1600x1066.jpg 1200w" sizes="(max-width: 768px) 100vw, 66vw" fetchpriority="auto" loading="lazy" decoding="async" data-action="click-&gt;photo#enlargePhoto" data-photo-url="https://static.getoccupi.com/uploads/mall_photo/photo/61440/8aac66c510c2aa61dcd675d31b2cf854221e67fc-1600x1066.jpg" src="https://getoccupi.com/cdn-cgi/image/width=900,quality=85,format=auto/https://static.getoccupi.com/uploads/mall_photo/photo/61440/8aac66c510c2aa61dcd675d31b2cf854221e67fc-1600x1066.jpg" /></div><div class="carousel-item"><img class="d-block w-100 photo-enlargeable cursor-pointer" alt="Plaza David Norte - Gallery Photo 3" title="Plaza David Norte - Gallery Photo 3" itemprop="image" width="1200" height="800" srcset="https://getoccupi.com/cdn-cgi/image/width=600,quality=85,format=auto/https://static.getoccupi.com/uploads/mall_photo/photo/61441/20240419-Panama-Boquete-5.jpg 600w, https://getoccupi.com/cdn-cgi/image/width=900,quality=85,format=auto/https://static.getoccupi.com/uploads/mall_photo/photo/61441/20240419-Panama-Boquete-5.jpg 900w, https://getoccupi.com/cdn-cgi/image/width=1200,quality=85,format=auto/https://static.getoccupi.com/uploads/mall_photo/photo/61441/20240419-Panama-Boquete-5.jpg 1200w" sizes="(max-width: 768px) 100vw, 66vw" fetchpriority="auto" loading="lazy" decoding="async" data-action="click-&gt;photo#enlargePhoto" data-photo-url="https://static.getoccupi.com/uploads/mall_photo/photo/61441/20240419-Panama-Boquete-5.jpg" src="https://getoccupi.com/cdn-cgi/image/width=900,quality=85,format=auto/https://static.getoccupi.com/uploads/mall_photo/photo/61441/20240419-Panama-Boquete-5.jpg" /></div><div class="carousel-item"><img class="d-block w-100 photo-enlargeable cursor-pointer" alt="Plaza David Norte - Gallery Photo 4" title="Plaza David Norte - Gallery Photo 4" itemprop="image" width="1200" height="800" srcset="https://getoccupi.com/cdn-cgi/image/width=600,quality=85,format=auto/https://static.getoccupi.com/uploads/mall_photo/photo/61442/a-saturday-afternoon-in-the-popular-santa-ana-park-in-panama-city-people-wear-mask-as-is-ruled-by-the-authorities-due-to-the-pandemic-2CT4217.jpg 600w, https://getoccupi.com/cdn-cgi/image/width=900,quality=85,format=auto/https://static.getoccupi.com/uploads/mall_photo/photo/61442/a-saturday-afternoon-in-the-popular-santa-ana-park-in-panama-city-people-wear-mask-as-is-ruled-by-the-authorities-due-to-the-pandemic-2CT4217.jpg 900w, https://getoccupi.com/cdn-cgi/image/width=1200,quality=85,format=auto/https://static.getoccupi.com/uploads/mall_photo/photo/61442/a-saturday-afternoon-in-the-popular-santa-ana-park-in-panama-city-people-wear-mask-as-is-ruled-by-the-authorities-due-to-the-pandemic-2CT4217.jpg 1200w" sizes="(max-width: 768px) 100vw, 66vw" fetchpriority="auto" loading="lazy" decoding="async" data-action="click-&gt;photo#enlargePhoto" data-photo-url="https://static.getoccupi.com/uploads/mall_photo/photo/61442/a-saturday-afternoon-in-the-popular-santa-ana-park-in-panama-city-people-wear-mask-as-is-ruled-by-the-authorities-due-to-the-pandemic-2CT4217.jpg" src="https://getoccupi.com/cdn-cgi/image/width=900,quality=85,format=auto/https://static.getoccupi.com/uploads/mall_photo/photo/61442/a-saturday-afternoon-in-the-popular-santa-ana-park-in-panama-city-people-wear-mask-as-is-ruled-by-the-authorities-due-to-the-pandemic-2CT4217.jpg" /></div><div class="carousel-item"><img class="d-block w-100 photo-enlargeable cursor-pointer" alt="Plaza David Norte - Gallery Photo 5" title="Plaza David Norte - Gallery Photo 5" itemprop="image" width="1200" height="800" srcset="https://getoccupi.com/cdn-cgi/image/width=600,quality=85,format=auto/https://static.getoccupi.com/uploads/mall_photo/photo/61443/08-025_Monumento_a_Vasco_Núñez_de_Balboa_-_Flickr_-_JMartinC.jpg 600w, https://getoccupi.com/cdn-cgi/image/width=900,quality=85,format=auto/https://static.getoccupi.com/uploads/mall_photo/photo/61443/08-025_Monumento_a_Vasco_Núñez_de_Balboa_-_Flickr_-_JMartinC.jpg 900w, https://getoccupi.com/cdn-cgi/image/width=1200,quality=85,format=auto/https://static.getoccupi.com/uploads/mall_photo/photo/61443/08-025_Monumento_a_Vasco_Núñez_de_Balboa_-_Flickr_-_JMartinC.jpg 1200w" sizes="(max-width: 768px) 100vw, 66vw" fetchpriority="auto" loading="lazy" decoding="async" data-action="click-&gt;photo#enlargePhoto" data-photo-url="https://static.getoccupi.com/uploads/mall_photo/photo/61443/08-025_Monumento_a_Vasco_Núñez_de_Balboa_-_Flickr_-_JMartinC.jpg" src="https://getoccupi.com/cdn-cgi/image/width=900,quality=85,format=auto/https://static.getoccupi.com/uploads/mall_photo/photo/61443/08-025_Monumento_a_Vasco_Núñez_de_Balboa_-_Flickr_-_JMartinC.jpg" /></div><div class="carousel-item"><img class="d-block w-100 photo-enlargeable cursor-pointer" alt="Plaza David Norte - Gallery Photo 6" title="Plaza David Norte - Gallery Photo 6" itemprop="image" width="1200" height="800" srcset="https://getoccupi.com/cdn-cgi/image/width=600,quality=85,format=auto/https://static.getoccupi.com/uploads/mall_photo/photo/61444/WhatsApp_Image_2025-12-09_at_3.21.48_PM__8_.jpeg 600w, https://getoccupi.com/cdn-cgi/image/width=900,quality=85,format=auto/https://static.getoccupi.com/uploads/mall_photo/photo/61444/WhatsApp_Image_2025-12-09_at_3.21.48_PM__8_.jpeg 900w, https://getoccupi.com/cdn-cgi/image/width=1200,quality=85,format=auto/https://static.getoccupi.com/uploads/mall_photo/photo/61444/WhatsApp_Image_2025-12-09_at_3.21.48_PM__8_.jpeg 1200w" sizes="(max-width: 768px) 100vw, 66vw" fetchpriority="auto" loading="lazy" decoding="async" data-action="click-&gt;photo#enlargePhoto" data-photo-url="https://static.getoccupi.com/uploads/mall_photo/photo/61444/WhatsApp_Image_2025-12-09_at_3.21.48_PM__8_.jpeg" src="https://getoccupi.com/cdn-cgi/image/width=900,quality=85,format=auto/https://static.getoccupi.com/uploads/mall_photo/photo/61444/WhatsApp_Image_2025-12-09_at_3.21.48_PM__8_.jpeg" /></div><div class="carousel-item"><img class="d-block w-100 photo-enlargeable cursor-pointer" alt="Plaza David Norte - Gallery Photo 7" title="Plaza David Norte - Gallery Photo 7" itemprop="image" width="1200" height="800" srcset="https://getoccupi.com/cdn-cgi/image/width=600,quality=85,format=auto/https://static.getoccupi.com/uploads/mall_photo/photo/61445/portraits-drawn-on-wall-in-memory-of-historical-figures-calle-l-near-plaza-jos-remn-cantera-and-avenida-central-panama-city-panama-oct-2018-T2PECN.jpg 600w, https://getoccupi.com/cdn-cgi/image/width=900,quality=85,format=auto/https://static.getoccupi.com/uploads/mall_photo/photo/61445/portraits-drawn-on-wall-in-memory-of-historical-figures-calle-l-near-plaza-jos-remn-cantera-and-avenida-central-panama-city-panama-oct-2018-T2PECN.jpg 900w, https://getoccupi.com/cdn-cgi/image/width=1200,quality=85,format=auto/https://static.getoccupi.com/uploads/mall_photo/photo/61445/portraits-drawn-on-wall-in-memory-of-historical-figures-calle-l-near-plaza-jos-remn-cantera-and-avenida-central-panama-city-panama-oct-2018-T2PECN.jpg 1200w" sizes="(max-width: 768px) 100vw, 66vw" fetchpriority="auto" loading="lazy" decoding="async" data-action="click-&gt;photo#enlargePhoto" data-photo-url="https://static.getoccupi.com/uploads/mall_photo/photo/61445/portraits-drawn-on-wall-in-memory-of-historical-figures-calle-l-near-plaza-jos-remn-cantera-and-avenida-central-panama-city-panama-oct-2018-T2PECN.jpg" src="https://getoccupi.com/cdn-cgi/image/width=900,quality=85,format=auto/https://static.getoccupi.com/uploads/mall_photo/photo/61445/portraits-drawn-on-wall-in-memory-of-historical-figures-calle-l-near-plaza-jos-remn-cantera-and-avenida-central-panama-city-panama-oct-2018-T2PECN.jpg" /></div></div><button aria-label="Previous photo" class="carousel-control-prev" data-action="click-&gt;photo#prevSlide" type="button"><span aria-hidden="true" class="carousel-control-prev-icon"></span></button><button aria-label="Next photo" class="carousel-control-next" data-action="click-&gt;photo#nextSlide" type="button"><span aria-hidden="true" class="carousel-control-next-icon"></span></button></div><div aria-label="Photo thumbnails" class="d-flex overflow-auto gap-1 py-1" id="thumbnail-strip" role="tablist"><div aria-label="View photo 1" aria-selected="true" class="thumbnail-item border-0 p-0 flex-shrink-0 active" data-action="click-&gt;photo#goToSlide" data-slide-index="0" role="tab"><img id="mall_photo_61439" alt="Plaza David Norte - Thumbnail 1" title="Plaza David Norte - Thumbnail 1" loading="lazy" itemprop="image" class="object-fit-cover rounded" width="104" height="58" src="https://getoccupi.com/cdn-cgi/image/width=150,quality=85,format=auto/https://static.getoccupi.com/uploads/mall_photo/photo/61439/leftc.jpg" /><div class="manage-controls"><a aria-label="Delete photo 1" data-turbo-method="delete" href="/malls/plaza-david-norte/mall_photos/61439"><i aria-hidden="true" class="ri-close-line"></i></a></div></div><div aria-label="View photo 2" aria-selected="false" class="thumbnail-item border-0 p-0 flex-shrink-0" data-action="click-&gt;photo#goToSlide" data-slide-index="1" role="tab"><img id="mall_photo_61440" alt="Plaza David Norte - Thumbnail 2" title="Plaza David Norte - Thumbnail 2" loading="lazy" itemprop="image" class="object-fit-cover rounded" width="104" height="58" src="https://getoccupi.com/cdn-cgi/image/width=150,quality=85,format=auto/https://static.getoccupi.com/uploads/mall_photo/photo/61440/8aac66c510c2aa61dcd675d31b2cf854221e67fc-1600x1066.jpg" /><div class="manage-controls"><a aria-label="Delete photo 2" data-turbo-method="delete" href="/malls/plaza-david-norte/mall_photos/61440"><i aria-hidden="true" class="ri-close-line"></i></a></div></div><div aria-label="View photo 3" aria-selected="false" class="thumbnail-item border-0 p-0 flex-shrink-0" data-action="click-&gt;photo#goToSlide" data-slide-index="2" role="tab"><img id="mall_photo_61441" alt="Plaza David Norte - Thumbnail 3" title="Plaza David Norte - Thumbnail 3" loading="lazy" itemprop="image" class="object-fit-cover rounded" width="104" height="58" src="https://getoccupi.com/cdn-cgi/image/width=150,quality=85,format=auto/https://static.getoccupi.com/uploads/mall_photo/photo/61441/20240419-Panama-Boquete-5.jpg" /><div class="manage-controls"><a aria-label="Delete photo 3" data-turbo-method="delete" href="/malls/plaza-david-norte/mall_photos/61441"><i aria-hidden="true" class="ri-close-line"></i></a></div></div><div aria-label="View photo 4" aria-selected="false" class="thumbnail-item border-0 p-0 flex-shrink-0" data-action="click-&gt;photo#goToSlide" data-slide-index="3" role="tab"><img id="mall_photo_61442" alt="Plaza David Norte - Thumbnail 4" title="Plaza David Norte - Thumbnail 4" loading="lazy" itemprop="image" class="object-fit-cover rounded" width="104" height="58" src="https://getoccupi.com/cdn-cgi/image/width=150,quality=85,format=auto/https://static.getoccupi.com/uploads/mall_photo/photo/61442/a-saturday-afternoon-in-the-popular-santa-ana-park-in-panama-city-people-wear-mask-as-is-ruled-by-the-authorities-due-to-the-pandemic-2CT4217.jpg" /><div class="manage-controls"><a aria-label="Delete photo 4" data-turbo-method="delete" href="/malls/plaza-david-norte/mall_photos/61442"><i aria-hidden="true" class="ri-close-line"></i></a></div></div><div aria-label="View photo 5" aria-selected="false" class="thumbnail-item border-0 p-0 flex-shrink-0" data-action="click-&gt;photo#goToSlide" data-slide-index="4" role="tab"><img id="mall_photo_61443" alt="Plaza David Norte - Thumbnail 5" title="Plaza David Norte - Thumbnail 5" loading="lazy" itemprop="image" class="object-fit-cover rounded" width="104" height="58" src="https://getoccupi.com/cdn-cgi/image/width=150,quality=85,format=auto/https://static.getoccupi.com/uploads/mall_photo/photo/61443/08-025_Monumento_a_Vasco_Núñez_de_Balboa_-_Flickr_-_JMartinC.jpg" /><div class="manage-controls"><a aria-label="Delete photo 5" data-turbo-method="delete" href="/malls/plaza-david-norte/mall_photos/61443"><i aria-hidden="true" class="ri-close-line"></i></a></div></div><div aria-label="View photo 6" aria-selected="false" class="thumbnail-item border-0 p-0 flex-shrink-0" data-action="click-&gt;photo#goToSlide" data-slide-index="5" role="tab"><img id="mall_photo_61444" alt="Plaza David Norte - Thumbnail 6" title="Plaza David Norte - Thumbnail 6" loading="lazy" itemprop="image" class="object-fit-cover rounded" width="104" height="58" src="https://getoccupi.com/cdn-cgi/image/width=150,quality=85,format=auto/https://static.getoccupi.com/uploads/mall_photo/photo/61444/WhatsApp_Image_2025-12-09_at_3.21.48_PM__8_.jpeg" /><div class="manage-controls"><a aria-label="Delete photo 6" data-turbo-method="delete" href="/malls/plaza-david-norte/mall_photos/61444"><i aria-hidden="true" class="ri-close-line"></i></a></div></div><div aria-label="View photo 7" aria-selected="false" class="thumbnail-item border-0 p-0 flex-shrink-0" data-action="click-&gt;photo#goToSlide" data-slide-index="6" role="tab"><img id="mall_photo_61445" alt="Plaza David Norte - Thumbnail 7" title="Plaza David Norte - Thumbnail 7" loading="lazy" itemprop="image" class="object-fit-cover rounded" width="104" height="58" src="https://getoccupi.com/cdn-cgi/image/width=150,quality=85,format=auto/https://static.getoccupi.com/uploads/mall_photo/photo/61445/portraits-drawn-on-wall-in-memory-of-historical-figures-calle-l-near-plaza-jos-remn-cantera-and-avenida-central-panama-city-panama-oct-2018-T2PECN.jpg" /><div class="manage-controls"><a aria-label="Delete photo 7" data-turbo-method="delete" href="/malls/plaza-david-norte/mall_photos/61445"><i aria-hidden="true" class="ri-close-line"></i></a></div></div></div></div><div aria-hidden="true" aria-labelledby="mallPhotoEnlargeModalLabel" class="modal fade" id="mallPhotoEnlargeModal" tabindex="-1"><div class="modal-dialog modal-fullscreen"><div class="modal-content bg-transparent border-0 vh-100"><h1 class="visually-hidden" id="mallPhotoEnlargeModalLabel">Plaza David Norte Photo Gallery</h1><button aria-label="Close" class="btn btn-dark btn-lg position-absolute rounded-circle d-flex align-items-center justify-content-center mall-photo-modal-close" data-bs-dismiss="modal" type="button"><i class="ri-close-line fs-4"></i></button><div class="modal-body p-0 h-100 d-flex align-items-center justify-content-center"><div class="carousel slide carousel-fade" data-bs-interval="false" data-bs-ride="false" data-bs-touch="true" data-bs-wrap="true" id="mallPhotoCarousel"><div class="carousel-indicators"><button aria-current="true" aria-label="Slide 1" class="active" data-bs-slide-to="0" data-bs-target="#mallPhotoCarousel" type="button"></button><button aria-current="" aria-label="Slide 2" data-bs-slide-to="1" data-bs-target="#mallPhotoCarousel" type="button"></button><button aria-current="" aria-label="Slide 3" data-bs-slide-to="2" data-bs-target="#mallPhotoCarousel" type="button"></button><button aria-current="" aria-label="Slide 4" data-bs-slide-to="3" data-bs-target="#mallPhotoCarousel" type="button"></button><button aria-current="" aria-label="Slide 5" data-bs-slide-to="4" data-bs-target="#mallPhotoCarousel" type="button"></button><button aria-current="" aria-label="Slide 6" data-bs-slide-to="5" data-bs-target="#mallPhotoCarousel" type="button"></button><button aria-current="" aria-label="Slide 7" data-bs-slide-to="6" data-bs-target="#mallPhotoCarousel" type="button"></button></div><div class="carousel-inner vh-100"><div class="carousel-item active"><div class="vh-100 d-flex align-items-center justify-content-center"><img alt="Plaza David Norte - Gallery Photo 1" class="d-block w-100 mh-100 vh-100 object-fit-contain cursor-pointer" data-action="click-&gt;photo#enlargePhoto" decoding="async" height="800" loading="lazy" src="https://getoccupi.com/cdn-cgi/image/width=1200,quality=85,format=auto/https://static.getoccupi.com/uploads/mall_photo/photo/61439/leftc.jpg" width="1200" /></div></div><div class="carousel-item"><div class="vh-100 d-flex align-items-center justify-content-center"><img alt="Plaza David Norte - Gallery Photo 2" class="d-block w-100 mh-100 vh-100 object-fit-contain cursor-pointer" data-action="click-&gt;photo#enlargePhoto" decoding="async" height="800" loading="lazy" src="https://getoccupi.com/cdn-cgi/image/width=1200,quality=85,format=auto/https://static.getoccupi.com/uploads/mall_photo/photo/61440/8aac66c510c2aa61dcd675d31b2cf854221e67fc-1600x1066.jpg" width="1200" /></div></div><div class="carousel-item"><div class="vh-100 d-flex align-items-center justify-content-center"><img alt="Plaza David Norte - Gallery Photo 3" class="d-block w-100 mh-100 vh-100 object-fit-contain cursor-pointer" data-action="click-&gt;photo#enlargePhoto" decoding="async" height="800" loading="lazy" src="https://getoccupi.com/cdn-cgi/image/width=1200,quality=85,format=auto/https://static.getoccupi.com/uploads/mall_photo/photo/61441/20240419-Panama-Boquete-5.jpg" width="1200" /></div></div><div class="carousel-item"><div class="vh-100 d-flex align-items-center justify-content-center"><img alt="Plaza David Norte - Gallery Photo 4" class="d-block w-100 mh-100 vh-100 object-fit-contain cursor-pointer" data-action="click-&gt;photo#enlargePhoto" decoding="async" height="800" loading="lazy" src="https://getoccupi.com/cdn-cgi/image/width=1200,quality=85,format=auto/https://static.getoccupi.com/uploads/mall_photo/photo/61442/a-saturday-afternoon-in-the-popular-santa-ana-park-in-panama-city-people-wear-mask-as-is-ruled-by-the-authorities-due-to-the-pandemic-2CT4217.jpg" width="1200" /></div></div><div class="carousel-item"><div class="vh-100 d-flex align-items-center justify-content-center"><img alt="Plaza David Norte - Gallery Photo 5" class="d-block w-100 mh-100 vh-100 object-fit-contain cursor-pointer" data-action="click-&gt;photo#enlargePhoto" decoding="async" height="800" loading="lazy" src="https://getoccupi.com/cdn-cgi/image/width=1200,quality=85,format=auto/https://static.getoccupi.com/uploads/mall_photo/photo/61443/08-025_Monumento_a_Vasco_Núñez_de_Balboa_-_Flickr_-_JMartinC.jpg" width="1200" /></div></div><div class="carousel-item"><div class="vh-100 d-flex align-items-center justify-content-center"><img alt="Plaza David Norte - Gallery Photo 6" class="d-block w-100 mh-100 vh-100 object-fit-contain cursor-pointer" data-action="click-&gt;photo#enlargePhoto" decoding="async" height="800" loading="lazy" src="https://getoccupi.com/cdn-cgi/image/width=1200,quality=85,format=auto/https://static.getoccupi.com/uploads/mall_photo/photo/61444/WhatsApp_Image_2025-12-09_at_3.21.48_PM__8_.jpeg" width="1200" /></div></div><div class="carousel-item"><div class="vh-100 d-flex align-items-center justify-content-center"><img alt="Plaza David Norte - Gallery Photo 7" class="d-block w-100 mh-100 vh-100 object-fit-contain cursor-pointer" data-action="click-&gt;photo#enlargePhoto" decoding="async" height="800" loading="lazy" src="https://getoccupi.com/cdn-cgi/image/width=1200,quality=85,format=auto/https://static.getoccupi.com/uploads/mall_photo/photo/61445/portraits-drawn-on-wall-in-memory-of-historical-figures-calle-l-near-plaza-jos-remn-cantera-and-avenida-central-panama-city-panama-oct-2018-T2PECN.jpg" width="1200" /></div></div></div></div><button class="carousel-control-prev" data-bs-slide="prev" data-bs-target="#mallPhotoCarousel" type="button"><span aria-hidden="true" class="carousel-control-prev-icon"></span><span class="visually-hidden">Previous</span></button><button class="carousel-control-next" data-bs-slide="next" data-bs-target="#mallPhotoCarousel" type="button"><span aria-hidden="true" class="carousel-control-next-icon"></span><span class="visually-hidden">Next</span></button></div></div></div></div><div id="mall-photo-scripts"><script>deletePhoto = function(elementID) {
  var img = document.getElementById(elementID)
  if (!img) return
  var thumb = img.closest('.thumbnail-item')
  if (!thumb) return
  var strip = document.getElementById('thumbnail-strip')
  if (!strip) return
  var thumbs = Array.from(strip.querySelectorAll('.thumbnail-item'))
  var idx = thumbs.indexOf(thumb)

  // Remove carousel item
  var items = document.querySelectorAll('#main-slide .carousel-item')
  if (items[idx]) {
    var wasActive = items[idx].classList.contains('active')
    items[idx].remove()
    if (wasActive) {
      var remaining = document.querySelectorAll('#main-slide .carousel-item')
      if (remaining.length > 0) remaining[0].classList.add('active')
    }
  }

  // Remove thumbnail
  thumb.remove()

  // Re-index thumbnail data-slide-index attributes
  document.querySelectorAll('#thumbnail-strip .thumbnail-item').forEach(function(t, i) {
    t.setAttribute('data-slide-index', i)
  })

  // Also remove from enlargement modal carousel
  var modalItems = document.querySelectorAll('#mallPhotoCarousel .carousel-item')
  if (modalItems[idx]) {
    var wasModalActive = modalItems[idx].classList.contains('active')
    modalItems[idx].remove()
    if (wasModalActive) {
      var remainingModal = document.querySelectorAll('#mallPhotoCarousel .carousel-item')
      if (remainingModal.length > 0) remainingModal[0].classList.add('active')
    }
  }

  // Re-index modal indicators
  var indicators = document.querySelectorAll('#mallPhotoCarousel .carousel-indicators button')
  if (indicators) {
    indicators.forEach(function(btn, i) {
      btn.setAttribute('data-bs-slide-to', i)
      btn.setAttribute('aria-label', 'Slide ' + (i + 1))
    })
  }
}</script></div></template></turbo-stream>