import{_ as A}from"./Bq5Jh8kd.js";import{_ as B}from"./DLtfb-FM.js";import{_ as I}from"./B1mlC0kw.js";import{e as b,j as T,l as j,f as L,o as r,c as f,a as c,F as P,s as R,x as g,w as x,H as m,t as E,g as C,h as F,_ as w,p as W,D as O,v as p,b as d,n as V}from"./4E0AjYEK.js";const $={class:"page-subnav__scroll"},D={class:"page-subnav__content"},z=["href","onClick"],H={class:"page-subnav__label"},M=b({__name:"PageSubNav",props:{items:{},isActive:{type:Function}},setup(t){const s=t,a=T(),o=j(),{locale:i}=L(),h=F(()=>i.value==="en");function l(e){return typeof e=="string"?e.startsWith("#")?e:o(e):typeof e=="object"&&e?.path?{...e,path:o(e.path)}:o(e)}function _(e,u){if(s.isActive)return s.isActive(e,a);const n=e.to;return typeof n=="string"&&n.startsWith("#")?a.hash===n:typeof n=="object"&&n!==null&&"hash"in n&&n.hash?a.hash===n.hash:u}return(e,u)=>{const n=I;return r(),f("div",{class:m(["page-subnav",{"page-subnav--en":C(h)}])},[c("div",$,[c("div",D,[(r(!0),f(P,null,R(t.items,(v,k)=>(r(),g(n,{key:k,to:l(v.to),custom:""},{default:x(({isActive:y,navigate:N,href:S})=>[c("a",{href:S,class:m(["page-subnav__item",{"page-subnav__item--active":_(v,y)}]),onClick:N},[c("span",H,E(v.label),1)],10,z)]),_:2},1032,["to"]))),128))])])],2)}}}),U=Object.assign(w(M,[["__scopeId","data-v-6c8b0b32"]]),{__name:"PageSubNav"});function X(t=80){const s=p(),a=p(!1);function o(){if(!s.value)return;const i=s.value.getBoundingClientRect();a.value=i.bottom<t}return W(()=>{window.addEventListener("scroll",o,{passive:!0}),o()}),O(()=>{window.removeEventListener("scroll",o)}),{carouselRef:s,isSticky:a}}const q=b({__name:"CarouselWithNav",props:{items:{},bannerConfig:{default:()=>({source:"",showText:!0})},navItems:{},isActive:{},stickyTop:{default:80}},setup(t){const s=t,{carouselRef:a,isSticky:o}=X(s.stickyTop);return(i,h)=>{const l=A,_=B,e=U;return r(),f("div",{ref_key:"carouselRef",ref:a,class:"carousel-with-nav"},[d(_,{items:t.items,"show-arrows":!1,"show-dots":!1,class:"carousel-with-nav__inner"},{default:x(({item:u})=>[d(l,{source:u,"source-x1":t.bannerConfig?.sourceX1,title:t.bannerConfig?.title,subtitle:t.bannerConfig?.subtitle,"color-from":t.bannerConfig?.colorFrom,"color-to":t.bannerConfig?.colorTo,"show-text":t.bannerConfig?.showText},null,8,["source","source-x1","title","subtitle","color-from","color-to","show-text"])]),_:1},8,["items"]),c("div",{class:m(["carousel-with-nav__nav",{"carousel-with-nav__nav--sticky":C(o)}])},[s.navItems?.length?(r(),g(e,{key:0,items:s.navItems,"is-active":s.isActive},null,8,["items","is-active"])):V("",!0)],2)],512)}}}),Y=Object.assign(w(q,[["__scopeId","data-v-80382440"]]),{__name:"CarouselWithNav"});export{Y as _};
