// @bun
var{defineProperty:H,getOwnPropertyNames:P,getOwnPropertyDescriptor:Q}=Object,R=Object.prototype.hasOwnProperty;function U(g){return this[g]}var _=(g)=>{var j=(J??=new WeakMap).get(g),D;if(j)return j;if(j=H({},"__esModule",{value:!0}),g&&typeof g==="object"||typeof g==="function"){for(var z of P(g))if(!R.call(j,z))H(j,z,{get:U.bind(g,z),enumerable:!(D=Q(g,z))||D.enumerable})}return J.set(g,j),j},J;var V=(g)=>g;function W(g,j){this[g]=V.bind(null,j)}var $=(g,j)=>{for(var D in j)H(g,D,{get:j[D],enumerable:!0,configurable:!0,set:W.bind(j,D)})};var X=(g,j)=>()=>(g&&(j=g(g=0)),j);var b=import.meta.require;function B(g){return g.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function Y(g){if(g.clientReactive.to)return{value:g.clientReactive.to,reactive:!0};if(g.serverDynamic.to!==void 0)return{value:String(g.serverDynamic.to),reactive:!1};if(typeof g.static.to==="string")return{value:g.static.to,reactive:!1};return{value:"#",reactive:!1}}var w;var Z=X(()=>{w={name:"StxLink",aliases:["stx-link"],render(g,j,D){let z=Y(g),I=(typeof g.static.class==="string"?g.static.class:"")||(typeof g.static.className==="string"?g.static.className:""),K=typeof g.static.activeClass==="string"?g.static.activeClass:"active",L=typeof g.static.exactActiveClass==="string"?g.static.exactActiveClass:"exact-active",M=g.static.prefetch===!0||g.static.prefetch==="true"||g.serverDynamic.prefetch===!0,q=[];if(z.reactive)q.push(`:href="${B(z.value)}"`);else q.push(`href="${B(z.value)}"`);if(I)q.push(`class="${B(I)}"`);if(q.push("data-stx-link"),q.push(`data-stx-active-class="${B(K)}"`),q.push(`data-stx-exact-active-class="${B(L)}"`),M)q.push("data-stx-prefetch");let O=new Set(["to","class","className","activeClass","exactActiveClass","prefetch"]);for(let[E,G]of Object.entries(g.static)){if(O.has(E))continue;if(typeof G==="boolean"){if(G)q.push(B(E))}else q.push(`${B(E)}="${B(G)}"`)}return`<a ${q.join(" ")}>${j}</a>`}}});Z();export{w as StxLinkBuiltin};
