import{_ as E}from"./preload-helper.js";import{createElement as u,render as m,hydrate as A}from"./preact.module.js";const v=({value:a,name:c,hydrate:t=!0})=>a?u(t?"astro-slot":"astro-static-slot",{name:c,dangerouslySetInnerHTML:{__html:a}}):null;v.shouldComponentUpdate=()=>!1;var h=v;const e=new Map;var V=a=>async(c,t,{default:i,...S},{client:y})=>{if(!a.hasAttribute("ssr"))return;for(const[n,f]of Object.entries(S))t[n]=u(h,{value:f,name:n});if(a.dataset.preactSignals){const{signal:n}=await E(async()=>{const{signal:s}=await import("./signals.module.js");return{signal:s}},[]);let f=JSON.parse(a.dataset.preactSignals);for(const[s,l]of Object.entries(f))if(Array.isArray(l))l.forEach(([r,o])=>{const g=t[s][o];let d=g;if(typeof o!="string"&&(d=g[0],o=g[1]),!e.has(r)){const w=n(d);e.set(r,w)}t[s][o]=e.get(r)});else{if(!e.has(l)){const r=n(t[s]);e.set(l,r)}t[s]=e.get(l)}}const _=u(c,t,i!=null?u(h,{value:i}):i);y==="only"?(a.innerHTML="",m(_,a)):A(_,a),a.addEventListener("astro:unmount",()=>m(null,a),{once:!0})};export{V as default};
