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