<?php

namespace modules\selfserve\config;

use Exception;
use traits\module_config_variable;

class selfserve_dynamic_image_size_c
{
    use module_config_variable;

    public const SIZE_ORIGINAL = 'original';
    public const SIZE_RELEVANT = 'relevant';

    /**
     * @throws Exception
     */
    public function __construct()
    {
        self::setupConfigVariable(
            'selfserve',
            'dynamic_image_size',
            'string',
            true,
            [self::SIZE_ORIGINAL, self::SIZE_RELEVANT],
            'Whether self-serve dynamic images are served in the original rendered size or resized to the relevant terminal size',
            self::SIZE_RELEVANT,
            false,
            self::SIZE_ORIGINAL
        );
    }
}
