"""Project management application service.

Orchestrate project CRUD, effective rules computation, and role resolution.
Following hexagonal architecture:
    gRPC mixin → ProjectService (application) → Repositories (infrastructure)
"""

from .active import ACTIVE_PROJECT_METADATA_KEY, ActiveProjectMixin
from .crud import ProjectCrudMixin
from .members import ProjectMembershipMixin
from .roles import ProjectRoleResolverMixin
from .rules import RuleInheritanceMixin


class ProjectService(
    RuleInheritanceMixin,
    ProjectRoleResolverMixin,
    ProjectCrudMixin,
    ActiveProjectMixin,
    ProjectMembershipMixin,
):
    """Application service for project management.

    Provide a clean interface for project operations:
    - CRUD for projects within workspaces
    - Effective rules computation (inheritance chain)
    - Role resolution (workspace role → project role)
    - Active project selection per workspace
    - Project membership operations
    """


__all__ = ["ACTIVE_PROJECT_METADATA_KEY", "ProjectService"]
