<?php

namespace backups;
require_once WD . '/modules/backups/config/backups_enabled_c.php';
require_once WD . '/modules/backups/config/backups_retention_recent_hours_c.php';
require_once WD . '/modules/backups/config/backups_retention_daily_days_c.php';
require_once WD . '/modules/backups/config/backups_retention_weekly_weeks_c.php';
require_once WD . '/modules/backups/config/backups_retention_monthly_months_c.php';
require_once WD . '/modules/backups/config/backups_app_data_enabled_c.php';
require_once WD . '/modules/backups/config/backups_verification_required_c.php';
require_once WD . '/modules/backups/config/backups_restore_enabled_c.php';

use backups\config\backups_app_data_enabled_c;
use backups\config\backups_enabled_c;
use backups\config\backups_restore_enabled_c;
use backups\config\backups_retention_daily_days_c;
use backups\config\backups_retention_monthly_months_c;
use backups\config\backups_retention_recent_hours_c;
use backups\config\backups_retention_weekly_weeks_c;
use backups\config\backups_verification_required_c;
use traits\module_config_t;

class backups_c
{
    use module_config_t;

    /**
     * The status of Backups, whether it is enabled or not
     * @var backups_enabled_c
     */
    public backups_enabled_c $enabled;
    public backups_retention_recent_hours_c $retention_recent_hours;
    public backups_retention_daily_days_c $retention_daily_days;
    public backups_retention_weekly_weeks_c $retention_weekly_weeks;
    public backups_retention_monthly_months_c $retention_monthly_months;
    public backups_app_data_enabled_c $app_data_enabled;
    public backups_verification_required_c $verification_required;
    public backups_restore_enabled_c $restore_enabled;


    public function __construct()
    {
        $this->setupConfig('Backups');
        $this->allowUpdate([
            backups_enabled_c::class,
            backups_retention_recent_hours_c::class,
            backups_retention_daily_days_c::class,
            backups_retention_weekly_weeks_c::class,
            backups_retention_monthly_months_c::class,
            backups_app_data_enabled_c::class,
            backups_verification_required_c::class,
            backups_restore_enabled_c::class,
        ]);
        $this->enabled = new backups_enabled_c();
        $this->retention_recent_hours = new backups_retention_recent_hours_c();
        $this->retention_daily_days = new backups_retention_daily_days_c();
        $this->retention_weekly_weeks = new backups_retention_weekly_weeks_c();
        $this->retention_monthly_months = new backups_retention_monthly_months_c();
        $this->app_data_enabled = new backups_app_data_enabled_c();
        $this->verification_required = new backups_verification_required_c();
        $this->restore_enabled = new backups_restore_enabled_c();
    }

}
