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

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

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

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

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