from dataclasses import dataclass
from enum import Enum
from typing import Callable, Optional


class SyncScope(Enum):
    GLOBAL = "global"
    SHARED = "shared"
    USER = "user"


@dataclass
class SyncMetaOptions:
    """Parsed and validated SyncMeta configuration."""

    scope: SyncScope = SyncScope.USER
    sync_filter: Optional[Callable] = None
    client_writable: bool = True
    write_check: Optional[Callable] = None
    owner_field: Optional[str] = None
