import{j as r}from"./jsx-runtime-Byf2O5Qf.js";import{c as l}from"./index-DzGUYBzK.js";import{c as f}from"./clsx-B-dksMZM.js";import{r as x,N as p}from"./chunk-HA7DTUK3-Cv5eIhAv.js";import{B as w}from"./index-CryK06Hj.js";import{F as h}from"./index.es-HLHXff-Q.js";import{y as j,D as b,j as v,F as D}from"./dialog-V8RO_26r.js";import{R as m}from"./index-B6meePy9.js";const d=x.createContext({open:!1,setOpen:e=>{},anchor:"left"});function i(e){let t=x.useContext(d);if(t===null)throw new Error(`<${e} /> is missing a parent component.`);return t}function R({onClick:e,closeOnClick:t=!0,className:a,...o}){const{open:s,setOpen:n}=i("RDrawerButton");return r.jsx("button",{onClick:()=>{e==null||e(s),t&&n(!s)},className:l("hover:cursor-pointer",a),...o})}function E({className:e,darkMode:t=!0}){return r.jsx(R,{className:l("flex h-fit items-start rounded-lg p-2",t?"text-white hover:bg-white/25 hover:text-white":"text-black/60 hover:text-black",e),children:r.jsx(h,{icon:w,className:"text-xl"})})}function I({className:e,children:t}){return i("RDrawerHeader"),r.jsx("header",{className:l("flex flex-col gap-2 border-b p-2",e),children:t})}function H({className:e,children:t}){return i("RDrawerBody"),r.jsx("div",{className:l("minimal-scrollbar flex min-h-0 flex-1 flex-col gap-2 overflow-auto p-2",e),children:t})}function L({className:e,children:t,closeOnClick:a=!1}){const{open:o,setOpen:s}=i("RDrawerButton");return r.jsx("footer",{className:l("mt-auto flex flex-col gap-2 border-t p-2",e),onClick:()=>{a&&s(!o)},children:t})}function N({children:e,className:t,onClick:a,closeOnClick:o=!0}){const{setOpen:s}=i("RDrawerItem");return r.jsx("div",{className:l("contents",t),onClick:n=>{a==null||a(n),o&&s(!1)},children:e})}function S({children:e,className:t,onClose:a,...o}){const{open:s,setOpen:n,anchor:c}=i("RDrawerPanel");return r.jsxs(j,{className:"z-modal relative",open:s,onClose:u=>{n(u),a==null||a(u)},...o,children:[r.jsx(b,{transition:!0,className:"fixed inset-0 bg-neutral-900/70 transition-opacity duration-300 ease-linear data-closed:opacity-0"}),r.jsx("div",{className:l("fixed inset-0 flex",c==="left"?"justify-start":"justify-end"),children:r.jsx(v,{transition:!0,className:l("relative flex w-full max-w-xs transform flex-col bg-white shadow-xl shadow-black/80 transition duration-300 ease-in-out",c==="left"?"data-closed:-translate-x-full":"data-closed:translate-x-full",t),children:r.jsx(D,{children:r.jsx("div",{className:"contents w-full duration-300 ease-in-out data-closed:opacity-0",children:e})})})})]})}function X({anchor:e,children:t,defaultOpen:a=!1,externalState:o=void 0}){const[s,n]=o??x.useState(a);return r.jsx(d.Provider,{value:{open:s,setOpen:n,anchor:e},children:t})}const A=({links:e,titleKey:t,end:a=void 0,light:o=!1})=>r.jsxs("section",{className:"mt-1 mb-5",children:[t?r.jsx("h3",{className:l("mx-1.5 text-xs font-bold tracking-wider uppercase select-none",o?"text-black":"text-slate-300"),children:r.jsx(m,{k:t})}):null,r.jsx("div",{className:"mt-1 flex flex-col gap-y-1 px-0.5 text-sm",children:e.map((s,n)=>r.jsx(N,{children:r.jsx(p,{className:({isActive:c})=>f("rounded-lg px-3 py-0.5 text-sm tracking-wide transition",c?"border border-blue-500 bg-blue-500/40 text-white":"text-white/75 hover:bg-blue-400/40 hover:text-white",o?"text-zinc-600/85! hover:bg-zinc-950/5 hover:font-medium":""),to:s.to,end:a,children:r.jsx(m,{k:s.label})})},n))})]});export{A as D,X as R,S as a,H as b,R as c,I as d,N as e,E as f,L as g};

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