import { Permission } from '../../common/enums/permission.enum';

export interface RoleConfig {
  name: string;
  isSystem: boolean;
  permissionFilter: (permissionName: Permission) => boolean;
}

export const rolesData: RoleConfig[] = [
  {
    name: 'مدیر (پلن پایه)',
    isSystem: false,
    permissionFilter: (name: Permission) =>
      name === Permission.MANAGE_FOODS ||
      name === Permission.MANAGE_CATEGORIES ||
      name === Permission.MANAGE_SCHEDULES ||
      name === Permission.MANAGE_PAGER ||
      name === Permission.MANAGE_CONTACTS ||
      name === Permission.MANAGE_ROLES ||
      
      name === Permission.MANAGE_SETTINGS ||
      name === Permission.MANAGE_ADMINS ||
      name == Permission.VIEW_REPORTS ||
      name == Permission.UPDATE_RESTAURANT
  },
  {
    name: 'مدیر ( پلن ویژه)',
    isSystem: false,
    permissionFilter: () => true, // All permissions for restaurant role
  },
  {
    name: 'حسابدار ',
    isSystem: false,
    permissionFilter: (name: Permission) =>
      name === Permission.VIEW_REPORTS || name === Permission.MANAGE_PAYMENTS || name === Permission.MANAGE_ORDERS,
  },
];
