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

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

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

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

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