--- // Import necessary utilities import { t, getLanguageFromPath, type SupportedLanguage } from "../lib/i18n"; // Define the props interface export interface Props { placeholder?: string; onSearch?: (query: string) => void; } // Destructure props const { placeholder, onSearch } = Astro.props; // Get current language const currentLang = getLanguageFromPath(Astro.url.pathname); const defaultPlaceholder = t('elements.searchPlaceholder', currentLang); // Get current search query from URL const currentSearchQuery = Astro.url.searchParams.get('search') || ''; ---