public static function booleanSwitch(string $name = '', array $values = [], bool $active = false,
                                         array $attributes = []): string
    {
        $defaultAttributes = ['method-get' => false];
        $userAttributes = \array_merge($defaultAttributes, $attributes);
        $isEnabled = !\array_key_exists('disabled', $userAttributes);
        $attributes = [];
        $attributes['type'] = 'hidden';
        $attributes['name'] = $userAttributes['method-get'] === false ? \sprintf('MFVARS[%s]', $name) : $name;
        $attributes['value'] = $active === true ? 1 : 0;
        $attributes['id'] = isset($userAttributes['id']) ? $userAttributes['id'] : $name;
        $userAttributes = static::clearAttributes($userAttributes, ['method-get', 'id', 'disabled']);

        $switch = [];
        $switch[] = Tags::div(Tags::i(), ['class' => 'switch cf']);
        $switch[] = Tags::label($values[0], ['class' => 'label-0']);
        $switch[] = Tags::label($values[1], ['class' => 'label-1']);
        $switch[] = Tags::input(\array_merge($attributes, $userAttributes));

        $class = ['form-switch', 'cf'];
        if ($active === true) {
            $class[] = 'active';
        }
        if (!$isEnabled) {
            $class[] = 'disabled';
        }
        return Tags::div($switch, ['class' => \implode(' ', $class)]);
    }