// @bun
var{defineProperty:F,getOwnPropertyNames:H,getOwnPropertyDescriptor:I}=Object,J=Object.prototype.hasOwnProperty;function K(b){return this[b]}var S=(b)=>{var q=(G??=new WeakMap).get(b),B;if(q)return q;if(q=F({},"__esModule",{value:!0}),b&&typeof b==="object"||typeof b==="function"){for(var j of H(b))if(!J.call(q,j))F(q,j,{get:K.bind(b,j),enumerable:!(B=I(b,j))||B.enumerable})}return G.set(b,q),q},G;var L=(b)=>b;function Q(b,q){this[b]=L.bind(null,q)}var V=(b,q)=>{for(var B in q)F(b,B,{get:q[B],enumerable:!0,configurable:!0,set:Q.bind(q,B)})};var W=(b,q)=>()=>(b&&(q=b(b=0)),q);var X=import.meta.require;function Z(b){if(typeof document>"u")return{setMeta:()=>{},setOgMeta:()=>{},removeMeta:()=>{},setTitle:()=>{}};function q(j,z){let E=document.querySelector(`meta[${j}="${z}"]`);if(!E)E=document.createElement("meta"),E.setAttribute(j,z),document.head.appendChild(E);return E}let B={setMeta(j,z){q("name",j).setAttribute("content",z)},setOgMeta(j,z){let E=j.startsWith("og:")?j:`og:${j}`;q("property",E).setAttribute("content",z)},removeMeta(j){let z=document.querySelector(`meta[name="${j}"]`);if(z)z.remove()},setTitle(j){document.title=j}};if(b){if(b.title)B.setTitle(b.title);if(b.description)B.setMeta("description",b.description);if(b.meta)for(let[j,z]of Object.entries(b.meta))B.setMeta(j,z);if(b.og)for(let[j,z]of Object.entries(b.og))B.setOgMeta(j,z)}return B}export{Z as useMeta};
