<?php

namespace GriffinForms\Admin\Choices\Traits;

trait AddressSubdivisions
{
    protected function getAddressSubdivisions()
    {
        return array(
            'US' => $this->getUnitedStatesSubdivisions(),
            'CA' => $this->getCanadaSubdivisions(),
            'GB' => $this->getUnitedKingdomSubdivisions(),
            'IN' => $this->getIndiaSubdivisions(),
            'FR' => $this->getFranceSubdivisions(),
            'DE' => $this->getGermanySubdivisions(),
            'IT' => $this->getItalySubdivisions(),
            'ES' => $this->getSpainSubdivisions(),
            'CH' => $this->getSwitzerlandSubdivisions(),
            'AU' => $this->getAustraliaSubdivisions(),
            'NZ' => $this->getNewZealandSubdivisions(),
            'ZA' => $this->getSouthAfricaSubdivisions(),
            'SA' => $this->getSaudiArabiaSubdivisions(),
            'AE' => $this->getUnitedArabEmiratesSubdivisions(),
            'BR' => $this->getBrazilSubdivisions(),
            'JP' => $this->getJapanSubdivisions(),
            'CN' => $this->getChinaSubdivisions()
        );
    }

    protected function getUnitedStatesSubdivisions()
    {
        return array(
            'AL' => 'Alabama',
            'AK' => 'Alaska',
            'AZ' => 'Arizona',
            'AR' => 'Arkansas',
            'CA' => 'California',
            'CO' => 'Colorado',
            'CT' => 'Connecticut',
            'DE' => 'Delaware',
            'DC' => 'District of Columbia',
            'FL' => 'Florida',
            'GA' => 'Georgia',
            'HI' => 'Hawaii',
            'ID' => 'Idaho',
            'IL' => 'Illinois',
            'IN' => 'Indiana',
            'IA' => 'Iowa',
            'KS' => 'Kansas',
            'KY' => 'Kentucky',
            'LA' => 'Louisiana',
            'ME' => 'Maine',
            'MD' => 'Maryland',
            'MA' => 'Massachusetts',
            'MI' => 'Michigan',
            'MN' => 'Minnesota',
            'MS' => 'Mississippi',
            'MO' => 'Missouri',
            'MT' => 'Montana',
            'NE' => 'Nebraska',
            'NV' => 'Nevada',
            'NH' => 'New Hampshire',
            'NJ' => 'New Jersey',
            'NM' => 'New Mexico',
            'NY' => 'New York',
            'NC' => 'North Carolina',
            'ND' => 'North Dakota',
            'OH' => 'Ohio',
            'OK' => 'Oklahoma',
            'OR' => 'Oregon',
            'PA' => 'Pennsylvania',
            'RI' => 'Rhode Island',
            'SC' => 'South Carolina',
            'SD' => 'South Dakota',
            'TN' => 'Tennessee',
            'TX' => 'Texas',
            'UT' => 'Utah',
            'VT' => 'Vermont',
            'VA' => 'Virginia',
            'WA' => 'Washington',
            'WV' => 'West Virginia',
            'WI' => 'Wisconsin',
            'WY' => 'Wyoming'
        );
    }

    protected function getCanadaSubdivisions()
    {
        return array(
            'AB' => 'Alberta',
            'BC' => 'British Columbia',
            'MB' => 'Manitoba',
            'NB' => 'New Brunswick',
            'NL' => 'Newfoundland and Labrador',
            'NT' => 'Northwest Territories',
            'NS' => 'Nova Scotia',
            'NU' => 'Nunavut',
            'ON' => 'Ontario',
            'PE' => 'Prince Edward Island',
            'QC' => 'Quebec',
            'SK' => 'Saskatchewan',
            'YT' => 'Yukon'
        );
    }

    protected function getUnitedKingdomSubdivisions()
    {
        return array(
            'ENG' => 'England',
            'NIR' => 'Northern Ireland',
            'SCT' => 'Scotland',
            'WLS' => 'Wales'
        );
    }

    protected function getIndiaSubdivisions()
    {
        return array(
            'AN' => 'Andaman and Nicobar Islands',
            'AP' => 'Andhra Pradesh',
            'AR' => 'Arunachal Pradesh',
            'AS' => 'Assam',
            'BR' => 'Bihar',
            'CH' => 'Chandigarh',
            'CT' => 'Chhattisgarh',
            'DN' => 'Dadra and Nagar Haveli and Daman and Diu',
            'DL' => 'Delhi',
            'GA' => 'Goa',
            'GJ' => 'Gujarat',
            'HR' => 'Haryana',
            'HP' => 'Himachal Pradesh',
            'JK' => 'Jammu and Kashmir',
            'JH' => 'Jharkhand',
            'KA' => 'Karnataka',
            'KL' => 'Kerala',
            'LA' => 'Ladakh',
            'LD' => 'Lakshadweep',
            'MP' => 'Madhya Pradesh',
            'MH' => 'Maharashtra',
            'MN' => 'Manipur',
            'ML' => 'Meghalaya',
            'MZ' => 'Mizoram',
            'NL' => 'Nagaland',
            'OR' => 'Odisha',
            'PB' => 'Punjab',
            'PY' => 'Puducherry',
            'RJ' => 'Rajasthan',
            'SK' => 'Sikkim',
            'TN' => 'Tamil Nadu',
            'TG' => 'Telangana',
            'TR' => 'Tripura',
            'UP' => 'Uttar Pradesh',
            'UT' => 'Uttarakhand',
            'WB' => 'West Bengal'
        );
    }

    protected function getFranceSubdivisions()
    {
        return array(
            'ARA' => 'Auvergne-Rhone-Alpes',
            'BFC' => 'Bourgogne-Franche-Comte',
            'BRE' => 'Bretagne',
            'CVL' => 'Centre-Val de Loire',
            'COR' => 'Corse',
            'GES' => 'Grand Est',
            'HDF' => 'Hauts-de-France',
            'IDF' => 'Ile-de-France',
            'NOR' => 'Normandie',
            'NAQ' => 'Nouvelle-Aquitaine',
            'OCC' => 'Occitanie',
            'PDL' => 'Pays de la Loire',
            'PAC' => 'Provence-Alpes-Cote d\'Azur',
            'GUA' => 'Guadeloupe',
            'GUF' => 'Guyane',
            'LRE' => 'La Reunion',
            'MAY' => 'Mayotte',
            'MTQ' => 'Martinique'
        );
    }

    protected function getGermanySubdivisions()
    {
        return array(
            'BW' => 'Baden-Wurttemberg',
            'BY' => 'Bayern',
            'BE' => 'Berlin',
            'BB' => 'Brandenburg',
            'HB' => 'Bremen',
            'HH' => 'Hamburg',
            'HE' => 'Hessen',
            'MV' => 'Mecklenburg-Vorpommern',
            'NI' => 'Niedersachsen',
            'NW' => 'Nordrhein-Westfalen',
            'RP' => 'Rheinland-Pfalz',
            'SL' => 'Saarland',
            'SN' => 'Sachsen',
            'ST' => 'Sachsen-Anhalt',
            'SH' => 'Schleswig-Holstein',
            'TH' => 'Thuringen'
        );
    }

    protected function getItalySubdivisions()
    {
        return array(
            'ABR' => 'Abruzzo',
            'BAS' => 'Basilicata',
            'CAL' => 'Calabria',
            'CAM' => 'Campania',
            'EMR' => 'Emilia-Romagna',
            'FVG' => 'Friuli-Venezia Giulia',
            'LAZ' => 'Lazio',
            'LIG' => 'Liguria',
            'LOM' => 'Lombardia',
            'MAR' => 'Marche',
            'MOL' => 'Molise',
            'PAB' => 'Provincia Autonoma di Bolzano',
            'PAT' => 'Provincia Autonoma di Trento',
            'PIE' => 'Piemonte',
            'PUG' => 'Puglia',
            'SAR' => 'Sardegna',
            'SIC' => 'Sicilia',
            'TOS' => 'Toscana',
            'UMB' => 'Umbria',
            'VDA' => "Valle d'Aosta",
            'VEN' => 'Veneto'
        );
    }

    protected function getSpainSubdivisions()
    {
        return array(
            'AN' => 'Andalucia',
            'AR' => 'Aragon',
            'AS' => 'Asturias',
            'CB' => 'Cantabria',
            'CL' => 'Castilla y Leon',
            'CM' => 'Castilla-La Mancha',
            'CT' => 'Cataluna',
            'EX' => 'Extremadura',
            'GA' => 'Galicia',
            'IB' => 'Islas Baleares',
            'CN' => 'Islas Canarias',
            'RI' => 'La Rioja',
            'MD' => 'Madrid',
            'MC' => 'Murcia',
            'NC' => 'Navarra',
            'PV' => 'Pais Vasco',
            'VC' => 'Comunidad Valenciana',
            'CE' => 'Ceuta',
            'ML' => 'Melilla'
        );
    }

    protected function getSwitzerlandSubdivisions()
    {
        return array(
            'AG' => 'Aargau',
            'AI' => 'Appenzell Innerrhoden',
            'AR' => 'Appenzell Ausserrhoden',
            'BE' => 'Bern',
            'BL' => 'Basel-Landschaft',
            'BS' => 'Basel-Stadt',
            'FR' => 'Fribourg',
            'GE' => 'Geneve',
            'GL' => 'Glarus',
            'GR' => 'Graubunden',
            'JU' => 'Jura',
            'LU' => 'Luzern',
            'NE' => 'Neuchatel',
            'NW' => 'Nidwalden',
            'OW' => 'Obwalden',
            'SG' => 'St. Gallen',
            'SH' => 'Schaffhausen',
            'SO' => 'Solothurn',
            'SZ' => 'Schwyz',
            'TG' => 'Thurgau',
            'TI' => 'Ticino',
            'UR' => 'Uri',
            'VD' => 'Vaud',
            'VS' => 'Valais',
            'ZG' => 'Zug',
            'ZH' => 'Zurich'
        );
    }

    protected function getAustraliaSubdivisions()
    {
        return array(
            'ACT' => 'Australian Capital Territory',
            'NSW' => 'New South Wales',
            'NT' => 'Northern Territory',
            'QLD' => 'Queensland',
            'SA' => 'South Australia',
            'TAS' => 'Tasmania',
            'VIC' => 'Victoria',
            'WA' => 'Western Australia'
        );
    }

    protected function getNewZealandSubdivisions()
    {
        return array(
            'AUK' => 'Auckland',
            'BOP' => 'Bay of Plenty',
            'CAN' => 'Canterbury',
            'CIT' => 'Chatham Islands Territory',
            'GIS' => 'Gisborne',
            'HKB' => 'Hawke\'s Bay',
            'MWT' => 'Manawatu-Whanganui',
            'MBH' => 'Marlborough',
            'NSN' => 'Nelson',
            'NTL' => 'Northland',
            'OTA' => 'Otago',
            'STL' => 'Southland',
            'TKI' => 'Taranaki',
            'TAS' => 'Tasman',
            'WKO' => 'Waikato',
            'WGN' => 'Wellington',
            'WTC' => 'West Coast'
        );
    }

    protected function getSouthAfricaSubdivisions()
    {
        return array(
            'EC' => 'Eastern Cape',
            'FS' => 'Free State',
            'GP' => 'Gauteng',
            'KZN' => 'KwaZulu-Natal',
            'LP' => 'Limpopo',
            'MP' => 'Mpumalanga',
            'NC' => 'Northern Cape',
            'NW' => 'North West',
            'WC' => 'Western Cape'
        );
    }

    protected function getSaudiArabiaSubdivisions()
    {
        return array(
            '01' => 'Riyadh',
            '02' => 'Makkah',
            '03' => 'Madinah',
            '04' => 'Eastern Province',
            '05' => 'Al-Qassim',
            '06' => 'Hail',
            '07' => 'Tabuk',
            '08' => 'Northern Borders',
            '09' => 'Jizan',
            '10' => 'Najran',
            '11' => 'Al-Bahah',
            '12' => 'Al-Jawf',
            '14' => 'Asir'
        );
    }

    protected function getUnitedArabEmiratesSubdivisions()
    {
        return array(
            'AJ' => 'Ajman',
            'AZ' => 'Abu Dhabi',
            'DU' => 'Dubai',
            'FU' => 'Fujairah',
            'RK' => 'Ras Al Khaimah',
            'SH' => 'Sharjah',
            'UQ' => 'Umm Al Quwain'
        );
    }

    protected function getBrazilSubdivisions()
    {
        return array(
            'AC' => 'Acre',
            'AL' => 'Alagoas',
            'AP' => 'Amapa',
            'AM' => 'Amazonas',
            'BA' => 'Bahia',
            'CE' => 'Ceara',
            'DF' => 'Distrito Federal',
            'ES' => 'Espirito Santo',
            'GO' => 'Goias',
            'MA' => 'Maranhao',
            'MT' => 'Mato Grosso',
            'MS' => 'Mato Grosso do Sul',
            'MG' => 'Minas Gerais',
            'PA' => 'Para',
            'PB' => 'Paraiba',
            'PR' => 'Parana',
            'PE' => 'Pernambuco',
            'PI' => 'Piaui',
            'RJ' => 'Rio de Janeiro',
            'RN' => 'Rio Grande do Norte',
            'RS' => 'Rio Grande do Sul',
            'RO' => 'Rondonia',
            'RR' => 'Roraima',
            'SC' => 'Santa Catarina',
            'SP' => 'Sao Paulo',
            'SE' => 'Sergipe',
            'TO' => 'Tocantins'
        );
    }

    protected function getJapanSubdivisions()
    {
        return array(
            'AI' => 'Aichi',
            'AK' => 'Akita',
            'AO' => 'Aomori',
            'CH' => 'Chiba',
            'EH' => 'Ehime',
            'FK' => 'Fukui',
            'FU' => 'Fukuoka',
            'FS' => 'Fukushima',
            'GI' => 'Gifu',
            'GU' => 'Gunma',
            'HI' => 'Hiroshima',
            'HK' => 'Hokkaido',
            'HY' => 'Hyogo',
            'IB' => 'Ibaraki',
            'IS' => 'Ishikawa',
            'IW' => 'Iwate',
            'KA' => 'Kagawa',
            'KG' => 'Kagoshima',
            'KN' => 'Kanagawa',
            'KO' => 'Kochi',
            'KU' => 'Kumamoto',
            'KY' => 'Kyoto',
            'MI' => 'Mie',
            'MY' => 'Miyagi',
            'MZ' => 'Miyazaki',
            'NA' => 'Nagano',
            'NG' => 'Nagasaki',
            'NR' => 'Nara',
            'NI' => 'Niigata',
            'OI' => 'Oita',
            'OK' => 'Okayama',
            'ON' => 'Okinawa',
            'OS' => 'Osaka',
            'SA' => 'Saga',
            'SI' => 'Saitama',
            'SH' => 'Shiga',
            'SM' => 'Shimane',
            'SO' => 'Shizuoka',
            'TO' => 'Tochigi',
            'TT' => 'Tokushima',
            'TY' => 'Tokyo',
            'TG' => 'Tottori',
            'TM' => 'Toyama',
            'WK' => 'Wakayama',
            'YA' => 'Yamagata',
            'YG' => 'Yamaguchi',
            'YN' => 'Yamanashi'
        );
    }

    protected function getChinaSubdivisions()
    {
        return array(
            'AH' => 'Anhui',
            'BJ' => 'Beijing',
            'CQ' => 'Chongqing',
            'FJ' => 'Fujian',
            'GS' => 'Gansu',
            'GD' => 'Guangdong',
            'GX' => 'Guangxi',
            'GZ' => 'Guizhou',
            'HAIN' => 'Hainan',
            'HB' => 'Hebei',
            'HL' => 'Heilongjiang',
            'HE' => 'Henan',
            'HK' => 'Hong Kong',
            'HN' => 'Hubei',
            'HUN' => 'Hunan',
            'IM' => 'Inner Mongolia',
            'JS' => 'Jiangsu',
            'JX' => 'Jiangxi',
            'JL' => 'Jilin',
            'LN' => 'Liaoning',
            'MO' => 'Macau',
            'NX' => 'Ningxia',
            'QH' => 'Qinghai',
            'SC' => 'Sichuan',
            'SD' => 'Shandong',
            'SHA' => 'Shanghai',
            'SX' => 'Shanxi',
            'SXN' => 'Shaanxi',
            'TJ' => 'Tianjin',
            'XJ' => 'Xinjiang',
            'XZ' => 'Tibet',
            'YN' => 'Yunnan',
            'ZJ' => 'Zhejiang',
            'TW' => 'Taiwan'
        );
    }
}
