<?php

namespace modules\selfserve;
require_once WD . '/modules/selfserve/config/selfserve_enabled_c.php';
require_once WD . '/modules/selfserve/config/selfserve_machine_wash_enabled_c.php';
require_once WD . '/modules/selfserve/config/selfserve_minute_product_c.php';
require_once WD . '/modules/selfserve/config/selfserve_machine_wash_minutes_included_c.php';
require_once WD . '/modules/selfserve/config/selfserve_dynamic_image_size_c.php';

use modules\selfserve\config\selfserve_dynamic_image_size_c;
use modules\selfserve\config\selfserve_enabled_c;
use modules\selfserve\config\selfserve_machine_wash_enabled_c;
use modules\selfserve\config\selfserve_machine_wash_minutes_included_c;
use modules\selfserve\config\selfserve_minute_product_c;
use traits\module_config_t;

class selfserve_c
{
    use module_config_t;

    /**
     * The status of the module
     * @var selfserve_enabled_c $enabled
     */
    public selfserve_enabled_c $enabled;
    /**
     * Whether machine wash is available in customer-facing self-serve flows
     * @var selfserve_machine_wash_enabled_c $machine_wash_enabled
     */
    public selfserve_machine_wash_enabled_c $machine_wash_enabled;
    /**
     * The product ID used for minute-based self-serve billing
     * @var selfserve_minute_product_c $minute_product
     */
    public selfserve_minute_product_c $minute_product;
    /**
     * Included machine wash minutes before minute-based self-serve billing starts
     * @var selfserve_machine_wash_minutes_included_c $machine_wash_minutes_included
     */
    public selfserve_machine_wash_minutes_included_c $machine_wash_minutes_included;
    /**
     * Dynamic image output size mode for self-serve terminals
     * @var selfserve_dynamic_image_size_c $dynamic_image_size
     */
    public selfserve_dynamic_image_size_c $dynamic_image_size;

    public function __construct()
    {
        $this->setupConfig('selfserve');
        $this->allowUpdate([
            selfserve_enabled_c::class,
            selfserve_machine_wash_enabled_c::class,
            selfserve_minute_product_c::class,
            selfserve_machine_wash_minutes_included_c::class,
            selfserve_dynamic_image_size_c::class
        ]);
        $this->enabled = new selfserve_enabled_c();
        $this->machine_wash_enabled = new selfserve_machine_wash_enabled_c();
        $this->minute_product = new selfserve_minute_product_c();
        $this->machine_wash_minutes_included = new selfserve_machine_wash_minutes_included_c();
        $this->dynamic_image_size = new selfserve_dynamic_image_size_c();
    }
}
