import{d as x,aY as _,j as C,r as S,D as B,o as r,c as o,h,w as g,e as d,t as y,n as f,u as n,f as k,F as m,g as w,a as N,b as V,_ as L,k as j}from"./entry.c67f80bd.js";const z={class:"transition-all duration-200 ease-out group-hover/category:text-kyowa-blue"},D={class:"mt-1 overflow-hidden"},F=x({__name:"SidebarSubmenu",props:{isCurrentCategory:{type:Boolean},category:{}},setup(b){const e=b,u=_(),l=C(),t=S(e.isCurrentCategory);function s(){t.value=!t.value}return B(e,()=>{t.value=e.isCurrentCategory}),(a,p)=>{const c=L;return r(),o(m,null,[h(c,{class:f(["group/category flex cursor-pointer select-none items-center justify-between px-2 py-3 text-link-m leading-6",{"bg-pale-blue":a.isCurrentCategory}]),to:!e.category.submenu&&e.category.link?n(l)(e.category.link):void 0,onClick:s},{default:g(()=>[d("div",z,y(e.category.text),1),e.category.submenu?(r(),o("div",{key:0,class:f(["relative block size-4 duration-200 ease-out before:absolute before:inset-0 before:m-auto before:block before:h-0.5 before:w-[11px] before:bg-black after:absolute after:inset-0 after:m-auto after:block after:h-[11px] after:w-0.5 after:bg-black after:transition-all group-hover/category:before:bg-kyowa-blue group-hover/category:after:bg-kyowa-blue",[n(t)?"after:rotate-90 after:opacity-0":"after:rotate-0 after:opacity-100"]])},null,2)):k("",!0)]),_:1},8,["class","to"]),e.category.submenu?(r(),o("div",{key:0,class:f(["grid grid-rows-[0fr] transition-[grid-template-rows] duration-200 ease-out",{"grid-rows-[1fr]":n(t)}])},[d("div",D,[(r(!0),o(m,null,w(e.category.submenu,(i,v)=>(r(),N(c,{key:i.text,class:f(["relative flex min-h-10 items-center gap-2 py-2 pl-8 pr-4 text-link-s transition-all duration-200 ease-out before:absolute before:left-4 before:top-0 before:block before:w-px before:bg-mono-20 after:absolute after:left-4 after:top-1/2 after:block after:h-px after:w-[7px] after:bg-mono-20 hover:text-kyowa-blue",[a.category.submenu&&v[V(y(i.text),1)]),_:2},1032,["class","to"]))),128))])],2)):k("",!0)],64)}}}),I={class:"flex w-full flex-none flex-col gap-2 md:w-[20vw] md:max-w-[260px]"},$=x({__name:"SideBar",props:{submenu:{}},setup(b){const e=_(),u=b,l=j(()=>u.submenu.findIndex(t=>{var s;return t.submenu?(s=t.submenu)==null?void 0:s.find(a=>a.link===e.path):t.link===e.path}));return(t,s)=>{const a=F;return r(),o("div",I,[(r(!0),o(m,null,w(u.submenu,(p,c)=>(r(),o("div",{key:p.text},[h(a,{category:p,"is-current-category":n(l)===c},null,8,["category","is-current-category"])]))),128))])}}});export{$ as _};

AltStyle によって変換されたページ (->オリジナル) /