package usecase

import (
	"context"

	"gateway/internal/model/permission/domain/entity"
)

// RolePermissionUseCase manages the role↔permission catalog assignments.
//
// Replace is the canonical "edit a role" call: the UI submits the full
// permission ID set the user wants, and the usecase computes parent
// closure + atomically rewrites role_permissions.
type RolePermissionUseCase interface {
	List(ctx context.Context, tenantID, roleID string) ([]*entity.Permission, error)
	Replace(ctx context.Context, tenantID, roleID string, permissionIDs []string) error
}
