1import{r as d,j as e,H as x,b as p,f as u,m as c,e as g,x as b,y as f}from"./index-DtinW7og.js";import{P as j}from"./PageHeader-Co2P5g8V.js";const h=({node:s,level:o})=>{const[n,m]=d.useState(o<2),t=s.children&&s.children.length>0,i=["bg-primary text-primary-foreground shadow-primary/20","bg-secondary text-secondary-foreground shadow-secondary/20","bg-destructive text-destructive-foreground shadow-destructive/20","bg-accent text-accent-foreground shadow-accent/20","bg-card border border-border text-foreground shadow-sm"],r=i[Math.min(o,i.length-1)];return e.jsxs(c.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},className:"relative pl-6 sm:pl-10",children:[e.jsx("div",{className:"absolute left-3 sm:left-5 top-0 h-full w-px bg-border/60"}),e.jsxs("div",{className:"relative flex items-center my-3",children:[e.jsx("div",{className:"absolute left-3 sm:left-5 top-1/2 -translate-x-1/2 -translate-y-1/2 h-3 w-3 rounded-full bg-background border-2 border-primary z-10"}),e.jsxs(c.div,{whileHover:{scale:1.02},className:`flex items-center p-4 rounded-2xl shadow-lg w-full z-10 ${r}`,children:[e.jsx("div",{className:"mr-4 p-2.5 rounded-xl bg-black/10 backdrop-blur-sm",children:e.jsx(g,{className:"h-5 w-5"})}),e.jsxs("div",{className:"flex-grow",children:[e.jsx("h3",{className:"text-base sm:text-lg font-black tracking-tight leading-tight",children:s.role}),s.description&&e.jsx("p",{className:"text-xs sm:text-sm mt-1 opacity-90",children:s.description})]}),t&&e.jsx("button",{onClick:()=>m(!n),className:"p-2 rounded-full hover:bg-black/10 transition-colors ml-2 flex-shrink-0",children:e.jsx(c.div,{animate:{rotate:n?90:0},children:e.jsx(b,{className:"h-5 w-5"})})})]})]}),e.jsx(f,{children:t&&n&&e.jsx(c.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},className:"pl-4 sm:pl-6 overflow-hidden",children:s.children.map(l=>e.jsx(h,{node:l,level:o+1},l.id))})})]})},N=()=>{const[s,o]=d.useState([]),[n,m]=d.useState(!0);return d.useEffect(()=>{(async()=>{const{data:i}=await u.from("organograma").select("*").order("display_order",{ascending:!0});if(i){const r={},l=[];i.forEach(a=>{r[a.id]={...a,children:[]}}
1),i.forEach(a=>{a.parent_id&&r[a.parent_id]?r[a.parent_id].children.push(r[a.id]):l.push(r[a.id])}),o(l)}m(!1)})()},[]),e.jsxs("div",{className:"bg-background min-h-screen",children:[e.jsx(x,{children:e.jsx("title",{children:"Nosso Organograma - MOV"})}),e.jsx(j,{title:"Nosso Organograma",subtitle:"A estrutura que nos permite gerar impacto e transformar futuros.",icon:p,theme:"orange"}),e.jsxs("div",{className:"py-24 relative overflow-hidden",children:[e.jsx("div",{className:"absolute inset-0 bg-geometric-pattern opacity-10 pointer-events-none"}),e.jsx("div",{className:"container mx-auto px-4 sm:px-6 relative z-10",children:n?e.jsx("div",{className:"flex justify-center items-center h-64",children:e.jsx("div",{className:"animate-spin rounded-full h-20 w-20 border-t-4 border-b-4 border-primary"})}):e.jsx("div",{className:"max-w-4xl mx-auto bg-card p-6 sm:p-10 rounded-3xl shadow-brand border border-border",children:s.map(t=>e.jsx(h,{node:t,level:0},t.id))})})]})]})};export{N 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.