"""Title library commands."""

from __future__ import annotations

from dataclasses import dataclass, field
from typing import List, Optional


@dataclass
class CreateTitleLibraryCommand:
    user_id: str
    name: str
    text: str
    category: str = "default"
    description: str = ""
    tags: List[str] = field(default_factory=list)
    metadata_: dict = field(default_factory=dict)


@dataclass
class UpdateTitleLibraryCommand:
    title_id: str
    user_id: str
    name: Optional[str] = None
    text: Optional[str] = None
    category: Optional[str] = None
    description: Optional[str] = None
    tags: Optional[List[str]] = None
    is_active: Optional[bool] = None
    metadata_: Optional[dict] = None
