1/* ANPG DEVTEAM - 23/09/2026, 12:53:51 */ 2import{u as d,j as e}from"./data-vendor-BRYI0K8G.js";import{r as y}from"./react-vendor-Bj9LQV-u.js";import{P as b}from"./PageLayout-B43uM63E.js";import{u as N,ae as _,T as c,w as m,af as v,ag as w,ah as C,ai as L,aj as q}from"./index-cwV7SCbt.js";import{u as K}from"./useTaxonomyLabels-BcfP-yXO.js";import{B as x}from"./badge-DH3OcwR0.js";import{C as p}from"./camera-BaCLsw_E.js";import{I as u}from"./image-off-mq2yJR4I.js";import"./PageBreadcrumb-Dy1zu2ro.js";import"./i18n-vendor-BSIZ7LIS.js";import"./motion-vendor-DMc3mo8t.js";import"./house-CbYFZtt0.js";import"./star-DIWblV4s.js";import"./circle-check-DFc5yF46.js";import"./charts-vendor-Cs07Jtv5.js";function Q(){const{data:i}=N("exploration-photo-gallery"),g=s=>{var a;return(a=i==null?void 0:i.find(j=>j.section_key===s))==null?void 0:a.content},{label:l}=K("basin"),[t,n]=y.useState(null),{data:o,isLoading:h}=d({queryKey:["public-exploration-galleries"],staleTime:5*60*1e3,queryFn:async()=>(await q.list({sort:"sort_order",limit:100})).data}),{data:r,isLoading:f}=d({queryKey:["public-gallery-photos",t==null?void 0:t.id],enabled:!!(t!=null&&t.id),staleTime:5*60*1e3,queryFn:async()=>(await _.list({gallery_id:t.id,sort:"sort_order",limit:500})).data});return e.jsxs(b,{pageKey:"exploration-photo-gallery",titleKey:"pages.exploration.photoGallery",subtitleKey:"pages.exploration.photoGallerySubtitle",icon:e.jsx(p,{className:"w-8 h-8 text-primary"}),breadcrumbs:[{labelKey:"nav.exploration",href:"/exploracao"},{label:"Registos Fotográficos"}],children:[e.jsxs("div",{className:"space-y-12",children:[["intro","details"].map(s=>{const a=g(s);return a?e.jsxs("section",{children:[e.jsx("h2",{className:"text-2xl font-bold text-foreground mb-4",children:e.jsx(c,{children:a.title})}),e.jsx("p",{className:"text-muted-foreground text-lg leading-relaxed",children:e.jsx(c,{children:a.body})})]},s):null}),h?e.jsx("div",{className:"text-center py-16 text-muted-foreground",children:e.jsx(m,{className:"w-6 h-6 mx-auto animate-spin"})}):o!=null&&o.length?e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6",children:o.map(s=>e.jsxs("button",{onClick:()=>n(s),className:"group text-left rounded-xl border border-border overflow-hidden bg-card hover:shadow-lg transition-shadow",children:[e.jsx("div",{className:"aspect-video bg-muted overflow-hidden flex items-center justify-center",children:s.cover_url?e.jsx("img",{src:s.cover_url,alt:s.title_pt,loading:"lazy",className:"w-full h-full object-cover group-hover:scale-105 transition-transform duration-300"}):e.jsx(u,{className:"w-10 h-10 text-muted-foreground/40"})}),e.jsxs("div",{className:"p-4 space-y-2",children:[e.jsxs("div",{className:"flex items-start justify-between gap-2",children:[e.jsx("h3",{className:"font-semibold text-foreground leading-tight",children:s.title_pt}),s.basin_code&&e.jsx(x,{variant:"secondary",className:"shrink-0",children:l(s.basin_code)})]}),s.description_pt&&e.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2",children:s.description_pt})]})]},s.id))}):e.jsxs("div",{className:"text-center py-16 text-muted-foreground",children:[e.jsx(p,{className:"w-12 h-12 mx-auto mb-4 opacity-30"}),e.jsx("p",{className:"text-lg font-medium mb-2",children:"Registos Fotográficos"}),e.jsx("p",{children:"Arquivo fotográfico das actividades de exploração geológica da ANPG. Conteúdo em preparação."})]})]}),e.jsx(v,{open:!!t,onOpenChange:s=>{s||n(null)},children:e.jsxs(w,{className:"max-w-4xl max-h-[90vh] overflow-y-auto",children:[e.jsx(C,{children:e.jsxs(L,{className:"flex items-center gap-2",children:[t==null?void 0:t.title_pt,(t==null?void 0:t.basin_code)&&e.jsx(x,{variant:"secondary",children:l(t.basin_code)})]})}),(t==null?void 0:t.description_pt)&&e.jsx("p",{className:"text-sm text-muted-foreground",children:t.description_pt}),f?e.jsx("div",{className:"text-center py-16",children:e.jsx(m,{className:"w-6 h-6 mx-auto animate-spin"})}):r!=null&&r.length?e.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-3 gap-3",children:r.map(s=>e.jsxs("figure",{className:"space-y-1",children:[e.jsx("div",{className:"aspect-square bg-muted rounded-lg overflow-hidden",children:e.jsx("img",{src:s.image_url,alt:s.caption_pt??"",loading:"lazy",className:"w-full h-full object-cover"})}),s.caption_pt&&e.jsx("figcaption",{className:"text-xs text-muted-foreground truncate",children:s.caption_pt})]},s.id))}):e.jsxs("div",{className:"text-center py-16 text-muted-foreground flex flex-col items-center gap-2",children:[e.jsx(u,{className:"w-8 h-8 opacity-40"}
2),"Esta galeria ainda não tem fotografias."]})]})})]})}export{Q as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.