<?php

namespace App\Enums;

enum ConfigType: string
{
    case TEXT = 'text';
    case NUMBER = 'number';
    case SWITCH = 'switch';
    case SELECT = 'select';
    case IMAGE = 'image';

    public function label(): string
    {
        return match ($this) {
            self::TEXT => '文本',
            self::NUMBER => '数字',
            self::SWITCH => '开关',
            self::SELECT => '下拉选择',
            self::IMAGE => '图片',
        };
    }
}
