<?php

namespace routes;

use classes\email;
use classes\entra;
use classes\redis;
use dynamicimages\images\machine_1;
use goals\classes\goals;
use goals\classes\goals_criteria;
use objects\collected_order_invoices_o;
use objects\departments_o;
use objects\order_items_o;
use objects\orders_o;
use objects\products_o;
use objects\users_o;
use traits\route_t;

class exampleRoute
{
    use route_t;

    public function run(): void
    {
        $this->get('/example', function () {
            global $response;
            $response->success(['message' => 'Hello World!']);
        });

        $this->get('/tmp-send-email', function () {
            global $response;
            $response->error(['message' => 'This route is deprecated.']);
        });
        $this->get('/tmp-washes-in-time', function () {
            global $response;
            $response->error(['message' => 'This route is deprecated.']);
        });
        $this->get('/tmp-customer-list-overcharged', function () {
            global $response;
            $response->error(['message' => 'This route is deprecated.']);
        });
        $this->get('/debug', function () {
            global $response;
            //$response->success(['message' => 'Debugging route!']);
            $machine_1 = new machine_1();
            //$machine_1->debugAssets();
            $machine_1->current_step = 0;
            $machine_1->only_generate_current_step = false;
            $machine_1->highlighted_buttons = [
                //0, 2, 4, 7
            ];
            $machine_1->setup();
            $machine_1->servePicture();
            exit;
        });
    }
}
