<?php

/*
 * Copyright (C) 2021 Echedey López Romero <elr@disroot.org>
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

$UserButton = '';

$TopButtons = '';

$UserName = 'EchedeyLR';
$UserPassword = '1234';

$LoginErrors = [];

$Page = '';

$Products = [
    [
        'id' => '001',
        'name' => 'EOMA68 Computing Devices',
        'description' => 'An Earth-friendly way to easily upgrade and fix your own computer',
        'price' => '1200',
        'image' => './images/eoma68.webp'
    ], [
        'id' => '002',
        'name' => 'GnuBee Personal Cloud 2',
        'description' => 'A low-cost, low-power NAS for 3.5\'\' drives',
        'price' => '175',
        'image' => './images/gnubee2.webp'
    ], [
        'id' => '003',
        'name' => 'Watchy',
        'description' => 'A fully open source & customizable E-Ink watch',
        'price' => '59',
        'image' => './images/watchy.webp'
    ], [
        'id' => '004',
        'name' => 'DiceKeys',
        'description' => 'Security keys you create by rolling dice',
        'price' => '25',
        'image' => './images/dicekeys.webp'
    ], [
        'id' => '005',
        'name' => 'Home Assistant Amber',
        'description' => 'Take control of your home as never before',
        'price' => '169',
        'image' => './images/amber.webp'
    ]
];

$Viewed = [];

$Favourites = [];

$Cart = [];
$CartShowed = false;

$Costs = [];

$Countries = [
    [
        'id' => 'spain',
        'name' => 'Spain'
    ]
];

$ProvincesFilter = [
    [
        'provincia_id' => '35'
    ],
    [
        'provincia_id' => '38'
    ]
];

$Provinces = DumpCanaryData('./data/provincias.json', $ProvincesFilter, 'provincia_id');

$Municipalities = DumpCanaryData('./data/municipios_islas.json', $Provinces, 'provincia_id');

$ZIPCodes = DumpCanaryData('./data/codigos_postales_municipios.json', $Municipalities, 'municipio_id', true, 'cp_id');

$RoadTypes = [
    [
        'id' => 'avenue',
        'name' => 'Avenue'
    ],
    [
        'id' => 'street',
        'name' => 'Street'
    ],
    [
        'id' => 'road',
        'name' => 'Road'
    ],
    [
        'id' => 'other',
        'name' => 'Other'
    ],
    [
        'id' => 'promenade',
        'name' => 'Promenade'
    ],
    [
        'id' => 'square',
        'name' => 'Square'
    ],
    [
        'id' => 'round',
        'name' => 'Round'
    ],
    [
        'id' => 'crosswalk',
        'name' => 'Crosswalk'
    ],
    [
        'id' => 'urbanization',
        'name' => 'Urbanization'
    ]
];

$Replies = [
    'firstname' => '',
    'lastname' => '',
    'telephone' => '',
    'information' => '',
    'country' => '',
    'province' => '',
    'municipality' => '',
    'zipcode' => '',
    'roadtype' => '',
    'roadname' => '',
    'number' => '',
    'complement' => ''
];

$Selects = [];

$CheckoutErrors = [];
