/**
 * Privacy Types
 * 
 * Centralized type definitions for user privacy settings.
 * 
 * Storage:
 * - ProfilePrivacySettings: stored in profiles table
 * - PrivacySettings: stored in user_preferences.privacy_settings (JSONB)
 * 
 * Security:
 * - All privacy settings are validated with Zod before database writes
 * - Changes are logged to profile_audit_log for compliance
 * - RLS policies ensure users can only modify their own settings
 */

/**
 * Privacy settings stored in user_preferences.privacy_settings
 */
export interface PrivacySettings {
  activity_visibility: 'public' | 'private';
  search_visibility: boolean;
  show_location: boolean;
  show_age: boolean;
  show_avatar: boolean;
  show_bio: boolean;
  show_activity_stats: boolean;
  show_home_park: boolean;
}

/**
 * Profile-level privacy settings
 */
export interface ProfilePrivacySettings {
  privacy_level: 'public' | 'private';
  show_pronouns: boolean;
}

/**
 * Combined form data for privacy tab
 */
export interface PrivacyFormData extends ProfilePrivacySettings, PrivacySettings {}

/**
 * User block information
 */
export interface UserBlock {
  id: string;
  blocker_id: string;
  blocked_id: string;
  reason?: string;
  created_at: string;
  blocked_profile?: {
    user_id: string;
    username: string;
    display_name?: string;
    avatar_url?: string;
  };
}
