use leptos::prelude::*;

#[component]
pub fn InputSSR(
    input_type: &'static str,
    placeholder: &'static str,
    disabled: bool,
    class: &'static str,
) -> impl IntoView {
    let base_classes = "w-full px-4 py-2 bg-white/5 border border-white/20 rounded-lg text-white \
                        placeholder-gray-400 backdrop-blur-md focus:outline-none focus:ring-2 \
                        focus:ring-cyan-500/50 focus:border-cyan-400/70 disabled:opacity-50 \
                        disabled:cursor-not-allowed transition-all duration-200";
    let combined_classes = format!("{} {}", base_classes, class);

    view! {
        <input
            type=input_type
            class=combined_classes
            placeholder=placeholder
            disabled=disabled
        />
    }
}
