from typing import Any

from django.contrib.auth.models import AbstractBaseUser
from django.db.models import Model
from wagtail.models.workflows import Task

class BaseLock:
    object: Model
    is_page: bool
    model_name: str
    def __init__(self, object: Model) -> None: ...
    def for_user(self, user: AbstractBaseUser) -> bool: ...
    def get_message(self, user: AbstractBaseUser) -> str | None: ...
    def get_icon(self, user: AbstractBaseUser) -> str: ...
    def get_locked_by(self, user: AbstractBaseUser) -> str: ...
    def get_description(self, user: AbstractBaseUser) -> str: ...
    def get_context_for_user(
        self, user: AbstractBaseUser, parent_context: dict[str, Any] | None = None
    ) -> dict[str, Any]: ...

class BasicLock(BaseLock):
    def for_user(self, user: AbstractBaseUser) -> bool: ...
    def get_message(self, user: AbstractBaseUser) -> str: ...
    def get_locked_by(self, user: AbstractBaseUser) -> str: ...
    def get_description(self, user: AbstractBaseUser) -> str: ...

class WorkflowLock(BaseLock):
    task: Task
    def __init__(self, object: Model, task: Task) -> None: ...
    def for_user(self, user: AbstractBaseUser) -> bool: ...
    def get_message(self, user: AbstractBaseUser) -> str | None: ...
    def get_icon(self, user: AbstractBaseUser, can_lock: bool = False) -> str: ...
    def get_locked_by(self, user: AbstractBaseUser, can_lock: bool = False) -> str: ...
    def get_description(self, user: AbstractBaseUser, can_lock: bool = False) -> str: ...
    def get_context_for_user(
        self, user: AbstractBaseUser, parent_context: dict[str, Any] | None = None
    ) -> dict[str, Any]: ...

class ScheduledForPublishLock(BaseLock):
    def for_user(self, user: AbstractBaseUser) -> bool: ...
    def get_message(self, user: AbstractBaseUser) -> str: ...
    def get_locked_by(self, user: AbstractBaseUser) -> str: ...
    def get_description(self, user: AbstractBaseUser) -> str: ...
