import"./xihTtKlq.mjs";import{Cn as e,Ht as t,Jt as n,Pt as r,Qt as i,S as a,V as o,Wt as s,Zt as c,c as l,dn as u,et as d,fn as f,gt as p,l as m,nt as h,yn as g}from"./DRAiiyBy.mjs";import{c as _,i as v,l as y,s as b}from"./2rg_Hy9V.mjs";import{t as x}from"./BunZ7B1w.mjs";import{a as S,n as C,o as w,r as T}from"./CL-xaCec.mjs";import{t as E}from"./AFfgJ8QW.mjs";var D=new Set([`$$slots`,`$$events`,`$$legacy`,`class`,`active`,`to`,`variant`,`prefetch`,`scrollTopOnClick`,`exact`,`size`,`testId`,`iconOnly`,`disabled`,`underline`,`children`,`onclick`]),O=h(``);function k(h,w){f(w,!0);let E=()=>i(v,`$route`,N),k=()=>i(b,`$navigating`,N),j=()=>i(_,`$page`,N),M=()=>i(y,`$updated`,N),[N,P]=c(),ee=T();S(!0);let F=l(w,`class`,3,void 0),I=l(w,`active`,3,void 0),L=l(w,`variant`,19,()=>C({parent:ee})),R=l(w,`prefetch`,3,`off`),z=l(w,`scrollTopOnClick`,3,!0),B=l(w,`exact`,3,!1),V=l(w,`size`,3,`md`),H=l(w,`testId`,3,void 0),U=l(w,`iconOnly`,3,!1),W=l(w,`disabled`,3,!1),G=l(w,`underline`,3,`none`),K=m(w,D),q=s(!1),J=e=>{W()&&e.preventDefault(),w.onclick?.(e)},Y=n(()=>E()(w.to)),X=n(()=>k()?k()?.to?.url?.pathname:j()?.url?.pathname),Z=n(()=>!!(I()===void 0?B()?p(X)===p(Y):p(Y)&&p(X)?.startsWith(p(Y)):I()));var Q=O(),$=()=>t(q,!0),te=()=>t(q,!1);a(Q,e=>({"data-testid":H(),class:e,href:p(Y),"data-sveltekit-reload":M()?``:`off`,"data-sveltekit-preload-data":W()?`off`:R(),"data-sveltekit-noscroll":z()===!1?``:`off`,onclick:J,onmouseenter:$,onmouseleave:te,...K}),[()=>x(A({variant:L(),active:p(Z),size:V(),disabled:W(),underline:G(),className:F(),iconOnly:U()}))]);var ne=r(Q);o(ne,()=>w.children??e,()=>({active:p(Z),hovered:p(q)})),g(Q),d(h,Q),u(),P()}var A=E({extend:w,variants:{disabled:{true:`pointer-events-none opacity-(--edge-opacity-disabled,0.5)`},underline:{standalone:`[text-decoration:none] hover:[text-decoration-line:underline] hover:[text-decoration-style:solid] hover:[text-decoration-skip-ink:none] hover:[text-decoration-thickness:8%] hover:[text-underline-offset:25%]`,inline:`[text-decoration-line:underline] [text-decoration-style:solid] [text-decoration-skip-ink:none] [text-decoration-thickness:8%] [text-underline-offset:25%] hover:[text-decoration-thickness:14%]`,none:`[text-decoration:none] hover:[text-decoration:none]`}},defaultVariants:{underline:`standalone`}});export{k as t};