import{d as z,e as M,l as V}from"./BmsEUx_s.js";import{u as E}from"./Caz6ZtR2.js";import{k as H,a as $,w as D,G as n,M as i,O as u,H as g,I as k,a1 as v,V as w,u as l,X as p,P as U,a7 as P}from"./BO9AmBA3.js";const F={class:"flex items-center z-1"},G={class:"text-yt-white para-5 px-4 group hover:text-white transition-all duration-150 my-4"},O={key:0,class:"w-[1px] h-8 bg-yt-white mx-2"},X={class:"text-yt-white para-5 px-4 group hover:text-white transition-all duration-150 my-4 cursor-pointer"},j=["onClick"],q={key:1,class:"w-[1px] h-8 bg-yt-white mx-2"},A={class:"text-yt-white para-5 px-4 group hover:text-white transition-all duration-150 my-4 cursor-pointer"},R=H({__name:"LayoutHeaderBikenavModels",props:{modelCategories:{},overviewCategory:{},currentCategoryId:{},selectedSplitCategoryId:{}},emits:["update-selected-split-category"],setup(B,{emit:N}){const m=B,L=N,C=$(),h=$(),x=z(),{formatLink:d}=M(x),{menu:b,tagNavigation:I}=E(),f=(e,o)=>{!e.childCount||e.childCount===0?(I(e,o),L("update-selected-split-category","")):L("update-selected-split-category",e)};return C.value=[...m.modelCategories].filter(e=>{var o,a,s,r;return((a=(o=e.translated)==null?void 0:o.name)==null?void 0:a.toLocaleLowerCase().includes("core"))||((r=(s=e.translated)==null?void 0:s.name)==null?void 0:r.toLocaleLowerCase().includes("frame"))}),h.value=[...m.modelCategories].filter(e=>{var o,a,s,r;return!((a=(o=e.translated)==null?void 0:o.name)!=null&&a.toLocaleLowerCase().includes("core"))&&!((r=(s=e.translated)==null?void 0:s.name)!=null&&r.toLocaleLowerCase().includes("frame"))}),D(()=>{b.value.mtbCategory.children,b.value.emtbCategory.children,C.value=[...m.modelCategories].filter(e=>{var o,a,s,r;return((a=(o=e.translated)==null?void 0:o.name)==null?void 0:a.toLocaleLowerCase().includes("core"))||((r=(s=e.translated)==null?void 0:s.name)==null?void 0:r.toLocaleLowerCase().includes("frame"))}),h.value=[...m.modelCategories].filter(e=>{var o,a,s,r;return!((a=(o=e.translated)==null?void 0:o.name)!=null&&a.toLocaleLowerCase().includes("core"))&&!((r=(s=e.translated)==null?void 0:s.name)!=null&&r.toLocaleLowerCase().includes("frame"))})}),(e,o)=>{var s,r,y,_;const a=V;return n(),i("div",null,[u("ul",F,[u("li",G,[e.overviewCategory.seoUrls?(n(),g(a,{key:0,to:l(d)(`/${(r=e.overviewCategory.seoUrls[((s=e.overviewCategory.seoUrls)==null?void 0:s.length)-1])==null?void 0:r.seoPathInfo}`),onClick:o[0]||(o[0]=t=>l(I)(e.overviewCategory,l(d)("/")))},{default:k(()=>[u("p",{class:v(["group-hover:b-b-2 transition-all duration-50",{"b-b-2":e.overviewCategory.id===e.currentCategoryId}])},w(e.$t("product.overview")),3)]),_:1},8,["to"])):p("",!0)]),(y=l(C))!=null&&y.length?(n(),i("li",O)):p("",!0),(n(!0),i(U,null,P(l(C),t=>{var c;return n(),i("li",X,[t.seoUrls?(n(),g(a,{key:0,to:(c=t.children)!=null&&c.length?void 0:l(d)(`/${t.seoUrls[0].seoPathInfo}`),onClick:S=>f(t,l(d)("/"))},{default:k(()=>[u("p",{class:v(["group-hover:b-b-2 transition-all duration-50 whitespace-nowrap",{"b-b-2":t.id===e.currentCategoryId&&!e.selectedSplitCategoryId||t.id===e.selectedSplitCategoryId}])},w(t.translated.name),3)]),_:2},1032,["to","onClick"])):t.children?(n(),i("div",{key:1,onClick:S=>f(t,l(d)("/"))},[u("p",{class:v(["group-hover:b-b-2 transition-all duration-50 whitespace-nowrap",{"b-b-2":t.id===e.currentCategoryId&&!e.selectedSplitCategoryId||t.id===e.selectedSplitCategoryId}])},w(t.translated.name),3)],8,j)):p("",!0)])}),256)),(_=l(h))!=null&&_.length?(n(),i("li",q)):p("",!0),(n(!0),i(U,null,P(l(h),t=>{var c;return n(),i("li",A,[t.seoUrls?(n(),g(a,{key:0,to:(c=t.children)!=null&&c.length?void 0:l(d)(`/${t.seoUrls[0].seoPathInfo}`),onClick:S=>f(t,l(d)("/"))},{default:k(()=>[u("p",{class:v(["group-hover:b-b-2 transition-all duration-50 whitespace-nowrap",{"b-b-2":t.id===e.currentCategoryId&&!e.selectedSplitCategoryId||t.id===e.selectedSplitCategoryId}])},w(t.translated.name),3)]),_:2},1032,["to","onClick"])):p("",!0)])}),256))])])}}});export{R as _};