package tech.easyflow.system.service;

import tech.easyflow.common.entity.LoginAccount;
import tech.easyflow.system.entity.vo.RoleCategoryAccessSnapshot;

import java.math.BigInteger;
import java.util.Set;

public interface CategoryPermissionService {

    boolean isCurrentSuperAdmin();

    boolean isSuperAdmin(LoginAccount loginAccount);

    RoleCategoryAccessSnapshot getCurrentAccess(String resourceType);

    RoleCategoryAccessSnapshot getAccess(String resourceType, LoginAccount loginAccount);

    Set<BigInteger> getCurrentVisibleCategoryIds(String resourceType);

    boolean canAccessCategory(String resourceType, BigInteger createdBy, BigInteger categoryId);

    boolean canAccessCategory(LoginAccount loginAccount, String resourceType, BigInteger createdBy, BigInteger categoryId);

    void assertCategoryResourceVisible(String resourceType, BigInteger createdBy, BigInteger categoryId, String message);
}
