"use client"; import { useState } from "react"; import countriesData from "./countries.json"; export default function CountriesPage() { const [selectedRegion, setSelectedRegion] = useState("all"); const [selectedCountry, setSelectedCountry] = useState(null); const filteredRegions = selectedRegion === "all" ? countriesData.regions : countriesData.regions.filter( (region) => region.name === selectedRegion, ); const handleCountryClick = (countryId: string) => { setSelectedCountry(selectedCountry === countryId ? null : countryId); }; const getCountryById = (id: string) => { for (const region of countriesData.regions) { const country = region.countries.find((c) => c.id === id); if (country) return country; } return null; }; return (
{/* Header */}

{countriesData.title}

{countriesData.subtitle}

{/* Popular Countries */}

Quốc Gia Phổ Biến

{countriesData.popularCountries.map((country) => (
handleCountryClick(country.id)} >
{country.flag}

{country.name}

{country.reason}

))}
{/* Region Filter */}
{countriesData.regions.map((region) => ( ))}
{/* Countries by Region */}
{filteredRegions.map((region) => (

{region.name}

{region.countries.map((country) => (
{/* Country Header */}
handleCountryClick(country.id)} >
{country.flag}

{country.name}

{country.description}

{selectedCountry === country.id ? "▼" : "▶"}
{/* Quick Info */}
Thời gian xử lý:
{country.processingTime}
Phí visa:
{country.fee}
{/* Detailed Info */} {selectedCountry === country.id && (
{/* Visa Types */}

Loại visa:

{country.visaTypes.map((type, index) => ( {type} ))}
{/* Validity */}

Thời hạn visa:

{country.validityPeriod}

{/* Requirements */}

Yêu cầu hồ sơ:

    {country.requirements.map((req, index) => (
  • {req}
  • ))}
{/* CTA */}
)}
))}
))}
{/* Contact CTA */}

Không Tìm Thấy Quốc Gia Bạn Cần?

Chúng tôi hỗ trợ visa cho hơn 50 quốc gia. Liên hệ để được tư vấn chi tiết

); }