import type { User } from '$lib/auth';
import { userHasPermission } from '$lib/auth';

export function canViewGoodsClasses(user: User | null): boolean {
	return userHasPermission(user, 'goods_classes.view');
}

export function canCreateGoodsClasses(user: User | null): boolean {
	return userHasPermission(user, 'goods_classes.create');
}

export function canEditGoodsClasses(user: User | null): boolean {
	return userHasPermission(user, 'goods_classes.edit');
}

export function canDeleteGoodsClasses(user: User | null): boolean {
	return userHasPermission(user, 'goods_classes.delete');
}
