"""Data models for waft_client."""

from __future__ import annotations

from dataclasses import dataclass
from datetime import datetime


@dataclass
class User:
    """An authenticated user."""

    id: str
    email: str
    created_at: datetime

    def to_dict(self) -> dict:
        return {
            "id": self.id,
            "email": self.email,
            "created_at": self.created_at.isoformat(),
        }


@dataclass
class ProviderInfo:
    """Describes an available authentication provider for the UI."""

    id: str  # "google", "apple", "password", "passkey"
    name: str  # "Google", "Apple", "Email & Password", "Passkey"
    provider_type: str  # "oauth", "password", "passkey"
