<?php
/**
 * National accessibility enforcement / complaints bodies for the 27 EU member states.
 *
 * Under Article 13 of the Web Accessibility Directive (2016/2102) and the
 * European Accessibility Act (Directive 2019/882), each member state designates
 * a body that handles the enforcement procedure and the feedback/complaints route.
 *
 * Values below use the designated national authority name and an official URL
 * (the dedicated accessibility-monitoring/complaints page where one exists, or a
 * stable official department page otherwise); site owners can override the contact
 * details in the wizard before publishing.
 */

defined( 'ABSPATH' ) || exit;

class TSFFE_Bodies {

	/**
	 * @return array<string, array{country:string,body:string,url:string}>
	 */
	public static function all(): array {
		return array(
			'AT' => array(
				'country' => 'Austria',
				'body'    => 'Sozialministeriumservice (Federal Office of Social Affairs)',
				'url'     => 'https://www.sozialministeriumservice.at/',
			),
			'BE' => array(
				'country' => 'Belgium',
				'body'    => 'Unia (Interfederal Centre for Equal Opportunities)',
				'url'     => 'https://www.unia.be/',
			),
			'BG' => array(
				'country' => 'Bulgaria',
				'body'    => 'Ministry of e-Government (Министерство на електронното управление)',
				'url'     => 'https://egov.government.bg/wps/portal/ministry-meu/home/web-accessibility/obligation.to.ensure.accessibility',
			),
			'HR' => array(
				'country' => 'Croatia',
				'body'    => 'Office of the Ombudsman of the Republic of Croatia (Pučki pravobranitelj)',
				'url'     => 'https://www.ombudsman.hr/',
			),
			'CY' => array(
				'country' => 'Cyprus',
				'body'    => 'Department of Information Technology Services (DITS), Deputy Ministry of Research, Innovation and Digital Policy',
				'url'     => 'https://www.gov.cy/dmrid/en/department-of-information-technology-services-dits/',
			),
			'CZ' => array(
				'country' => 'Czechia',
				'body'    => 'Ministry of the Interior of the Czech Republic (Ministerstvo vnitra)',
				'url'     => 'https://www.mvcr.cz/',
			),
			'DK' => array(
				'country' => 'Denmark',
				'body'    => 'Danish Agency for Digital Government (Digitaliseringsstyrelsen)',
				'url'     => 'https://www.digst.dk/',
			),
			'EE' => array(
				'country' => 'Estonia',
				'body'    => 'Estonian Information System Authority (Riigi Infosüsteemi Amet)',
				'url'     => 'https://www.ria.ee/',
			),
			'FI' => array(
				'country' => 'Finland',
				'body'    => 'Regional State Administrative Agency for Southern Finland (Aluehallintovirasto)',
				'url'     => 'https://www.saavutettavuusvaatimukset.fi/',
			),
			'FR' => array(
				'country' => 'France',
				'body'    => 'DINUM — Direction interministérielle du numérique',
				'url'     => 'https://design.numerique.gouv.fr/',
			),
			'DE' => array(
				'country' => 'Germany',
				'body'    => 'Überwachungsstelle des Bundes für Barrierefreiheit von Informationstechnik (BFIT-Bund)',
				'url'     => 'https://www.bfit-bund.de/',
			),
			'GR' => array(
				'country' => 'Greece',
				'body'    => 'General Secretariat of Information Systems & Digital Governance (GSIS), Ministry of Digital Governance',
				'url'     => 'https://www.gsis.gr/tomeis-politikis/tomeis-politikis-psifiaki-diakybernisi/psifiaki-prosbasimotita',
			),
			'HU' => array(
				'country' => 'Hungary',
				'body'    => 'Governmental Agency for IT Development (Kormányzati Informatikai Fejlesztési Ügynökség, KIFÜ)',
				'url'     => 'https://kifu.gov.hu/webakadalymentesites/',
			),
			'IE' => array(
				'country' => 'Ireland',
				'body'    => 'National Disability Authority (NDA)',
				'url'     => 'https://nda.ie/',
			),
			'IT' => array(
				'country' => 'Italy',
				'body'    => 'Agenzia per l’Italia Digitale (AgID)',
				'url'     => 'https://www.agid.gov.it/',
			),
			'LV' => array(
				'country' => 'Latvia',
				'body'    => 'State Chancellery of the Republic of Latvia (Valsts kanceleja)',
				'url'     => 'https://www.mk.gov.lv/',
			),
			'LT' => array(
				'country' => 'Lithuania',
				'body'    => 'Communications Regulatory Authority (Ryšių reguliavimo tarnyba, RRT)',
				'url'     => 'https://www.rrt.lt/',
			),
			'LU' => array(
				'country' => 'Luxembourg',
				'body'    => 'Service information et presse (SIP) — Information and Press Service',
				'url'     => 'https://accessibilite.public.lu/',
			),
			'MT' => array(
				'country' => 'Malta',
				'body'    => 'Commission for the Rights of Persons with Disability (CRPD)',
				'url'     => 'https://www.crpd.org.mt/',
			),
			'NL' => array(
				'country' => 'Netherlands',
				'body'    => 'College voor de Rechten van de Mens (Netherlands Institute for Human Rights)',
				'url'     => 'https://www.mensenrechten.nl/',
			),
			'PL' => array(
				'country' => 'Poland',
				'body'    => 'Ministry of Digital Affairs (Ministerstwo Cyfryzacji)',
				'url'     => 'https://www.gov.pl/web/cyfryzacja',
			),
			'PT' => array(
				'country' => 'Portugal',
				'body'    => 'Agência para a Modernização Administrativa (AMA)',
				'url'     => 'https://www.acessibilidade.gov.pt/',
			),
			'RO' => array(
				'country' => 'Romania',
				'body'    => 'Authority for the Digitalization of Romania (Autoritatea pentru Digitalizarea României, ADR)',
				'url'     => 'https://www.adr.gov.ro/',
			),
			'SK' => array(
				'country' => 'Slovakia',
				'body'    => 'Ministry of Investments, Regional Development and Informatization (MIRRI)',
				'url'     => 'https://www.mirri.gov.sk/',
			),
			'SI' => array(
				'country' => 'Slovenia',
				'body'    => 'Ministry of Digital Transformation (Ministrstvo za digitalno preobrazbo)',
				'url'     => 'https://www.gov.si/drzavni-organi/ministrstva/ministrstvo-za-digitalno-preobrazbo/',
			),
			'ES' => array(
				'country' => 'Spain',
				'body'    => 'Observatorio de Accesibilidad Web (Ministerio para la Transformación Digital)',
				'url'     => 'https://administracionelectronica.gob.es/',
			),
			'SE' => array(
				'country' => 'Sweden',
				'body'    => 'Agency for Digital Government (Myndigheten för digital förvaltning, DIGG)',
				'url'     => 'https://www.digg.se/',
			),
		);
	}

	/**
	 * @param string $country Two-letter ISO country code (e.g. "DE").
	 * @return array{country:string,body:string,url:string}|null
	 */
	public static function get( string $country ): ?array {
		$code = strtoupper( trim( $country ) );
		$all  = self::all();

		return $all[ $code ] ?? null;
	}
}
