import {Type} from "@/interfaces/user";

export const PERMISSIONS = {
	generateCode: {
		student: ["corporate", "developer", "admin", "mastercorporate"],
		teacher: ["corporate", "developer", "admin", "mastercorporate"],
		corporate: ["admin", "developer"],
		mastercorporate: ["admin", "developer"],

		admin: ["developer", "admin"],
		agent: ["developer", "admin"],
		developer: ["developer"],
	},
	deleteUser: {
		student: {
			perm: "deleteStudent",
			list: ["corporate", "developer", "admin", "mastercorporate"],
		},
		teacher: {
			perm: "deleteTeacher",
			list: ["corporate", "developer", "admin", "mastercorporate"],
		},
		corporate: {
			perm: "deleteCorporate",
			list: ["admin", "developer"],
		},
		mastercorporate: {
			perm: undefined,
			list: ["admin", "developer"],
		},

		admin: {
			perm: "deleteAdmin",
			list: ["developer", "admin"],
		},
		agent: {
			perm: "deleteCountryManager",
			list: ["developer", "admin"],
		},
		developer: {
			perm: undefined,
			list: ["developer"],
		},
	},
	updateUser: {
		student: {
			perm: "editStudent",
			list: ["developer", "admin", "corporate", "mastercorporate", "teacher"],
		},
		teacher: {
			perm: "editTeacher",
			list: ["developer", "admin", "corporate", "mastercorporate"],
		},

		corporate: {
			perm: "editCorporate",
			list: ["developer", "admin", "mastercorporate"],
		},
		mastercorporate: {
			perm: undefined,
			list: ["admin", "developer"],
		},

		admin: {
			perm: "editAdmin",
			list: ["developer", "admin"],
		},

		agent: {
			perm: "editCountryManager",
			list: ["developer", "admin"],
		},
		developer: {
			perm: undefined,
			list: ["developer"],
		},
	},
	updateExpiryDate: {
		student: ["developer", "admin"],
		teacher: ["developer", "admin"],
		corporate: ["admin", "developer"],
		mastercorporate: ["admin", "developer"],

		admin: ["developer", "admin"],
		agent: ["developer", "admin"],
		developer: ["developer"],
	},
	examManagement: {
		delete: ["developer", "admin"],
	},
};
