use leptos::prelude::*;

#[component]
pub fn ModalSSR(children: Children, class: &'static str) -> impl IntoView {
    view! {
        <div class="fixed inset-0 bg-black/50 backdrop-blur-sm z-40 flex items-center justify-center p-4">
            <div class={format!(
                "bg-white/10 backdrop-blur-md border border-white/20 rounded-xl shadow-2xl \
                 shadow-cyan-500/20 p-6 max-w-lg w-full max-h-[90vh] overflow-y-auto {}",
                class
            )}>
                {children()}
            </div>
        </div>
    }
}
