namespace Ikar.Shared;

public sealed record UserSummaryDto(
    Guid Id,
    string Username,
    string DisplayName,
    bool IsOnline,
    string? PhoneNumber,
    DateTimeOffset? LastSeenAt,
    string? About,
    string? AvatarPath,
    bool IsBot = false);

public sealed record ResolveContactsRequest(IReadOnlyList<string> PhoneNumbers);

public sealed record ContactMatchDto(
    string PhoneNumber,
    UserSummaryDto User);

public sealed record UpdateMyProfileRequest(
    string DisplayName,
    string? About);

public sealed record PrivacySettingsDto(
    string PhoneNumberVisibility,
    string LastSeenVisibility,
    string ProfilePhotoVisibility,
    IReadOnlyList<Guid> BlockedUserIds,
    IReadOnlyList<Guid> AlwaysAllowUserIds,
    IReadOnlyList<Guid> NeverAllowUserIds,
    bool PasscodeLockEnabled,
    bool ShowMessagePreview,
    DateTimeOffset UpdatedAt);

public sealed record UpdatePrivacySettingsRequest(
    string PhoneNumberVisibility,
    string LastSeenVisibility,
    string ProfilePhotoVisibility,
    IReadOnlyList<Guid>? BlockedUserIds = null,
    IReadOnlyList<Guid>? AlwaysAllowUserIds = null,
    IReadOnlyList<Guid>? NeverAllowUserIds = null,
    bool PasscodeLockEnabled = false,
    bool ShowMessagePreview = true);

public sealed record UserSessionDto(
    Guid Id,
    DateTimeOffset CreatedAt,
    DateTimeOffset LastSeenAt,
    bool IsCurrent,
    string DeviceName);
