<?php

namespace App\Enums;

enum Modules: string
{
    case PRODUCT = 'product';
    case EMPLOYEE = 'employee';
    case ORDER = 'order';
    case PURCHASE = 'purchase';
    case RAW_MATERIAL = 'raw_material';
    case EXPENSE = 'expense';
    case USER = 'user';
    case HOMEPAGE = 'homepage';
    case OTHER = 'other';

    public function label(): string
    {
        return match ($this) {
            self::PRODUCT => 'Produk',
            self::EMPLOYEE => 'Karyawan',
            self::ORDER => 'Pesanan',
            self::PURCHASE => 'Belanja',
            self::RAW_MATERIAL => 'Bahan Baku',
            self::EXPENSE => 'Pengeluaran',
            self::USER => 'Pengguna',
            self::HOMEPAGE => 'Homepage',
            self::OTHER => 'Lainnya',
        };
    }
}
