import{T as f}from"./yXj_05M0.js";import h from"./tESAK1vk.js";import{d as _,j as u,v as g,c as v,a as b,E as y,g as c,o as S,C as T,f as d,G as k,s as C,F as I}from"./dVzHJMF1.js";function B(t){const e=document.getElementById(t);e&&(e.scrollIntoView({behavior:"smooth"}),e.classList.add("focus-animation"),setTimeout(()=>{e.classList.remove("focus-animation")},3e3))}const w=_({__name:"SectionsMenu",props:{items:{default:()=>{}},top:{type:Boolean,default:!1},class:{default:()=>{}}},setup(t){const e=u(),a=u([]);g(()=>{setTimeout(()=>{const o=[];document.querySelectorAll("section").forEach(i=>{const n=i.getAttribute("data-title"),s=i.id;!n||!s||o.push({label:n,command(){B(s)}})}),a.value=o},10)});const l=v(()=>t.top?[{label:"Inicio",command(){document.body.scrollTo({top:0,left:0,behavior:"smooth"})}},...t.items||a.value]:t.items||a.value);return(o,i)=>{var m,r;const n=C,s=h,p=f;return((m=c(l))==null?void 0:m.length)>0?(S(),b(I,{key:0},[T(d(n,{icon:"pi pi-list",class:k(["sm:p-button-secondary",t.class]),"aria-label":"Seções da página",title:"Seções da página",onClick:(r=c(e))==null?void 0:r.toggle},null,8,["class","onClick"]),[[p,"Seções da página",void 0,{left:!0}]]),d(s,{ref_key:"menu",ref:e,model:c(l),popup:"",class:"max-h-80 overflow-y-auto"},null,8,["model"])],64)):y("",!0)}}}),V=Object.assign(w,{__name:"UiSectionsMenu"});export{V as _,B as h};
