import { useAuth } from "@/app/auth/AuthProvider.jsx";
import { PERMISSIONS } from "@/app/permissions";

export function useRoomAbilities() {
    const { can } = useAuth();

    return {
        canUpdateConfig: can(PERMISSIONS.roomConfigUpdate),
        canViewConfig: can(PERMISSIONS.roomConfigView),
        canUpdateWhitelist: can(PERMISSIONS.roomWhitelistUpdate),
        canViewWhitelist: can(PERMISSIONS.roomWhitelistView),
        canDelete: can(PERMISSIONS.roomDelete),
        canPinCancel: can(PERMISSIONS.roomPinCancel),
        canPinCreate: can(PERMISSIONS.roomPinCreate),
        canPinView: can(PERMISSIONS.roomPinView),
        canRobotCreate: can(PERMISSIONS.roomRobotCreate),
        canRobotUpdate: can(PERMISSIONS.roomRobotUpdate),
        canRobotView: can(PERMISSIONS.roomRobotView),
        canUpdate: can(PERMISSIONS.roomUpdate),
        canUpload: can(PERMISSIONS.uploadCreate),
        canView: can(PERMISSIONS.roomView),
    };
}
