<?php
// --- General settings ---
return [
  'base_url'      => 'https://client.towlens.net', // no trailing slash
  'env'           => 'prod', // 'dev' or 'prod'
  'demo_mode'     => false,   // <<< set to true for demo, false for normal operation

  'upload_dir'    => __DIR__ . '/../uploads', // ideally store outside web root
  'max_file_mb'   => 22,     // per file
  'max_files_each'=> 8,      // max vehicle + max scene
  'allowed_mimes' => [
    'image/jpeg' => 'jpg',
    'image/png'  => 'png',
    'image/heic' => 'heic',
    'image/heif' => 'heif',
    'image/webp' => 'webp',
    'image/gif'  => 'gif',
    'video/mp4'       => 'mp4',
    'application/mp4' => 'mp4' // optional: some servers report MP4 as this
  ],

  'db' => [
    'host' => 'localhost',
    'name' => 'c9538790_veh_photos',
    'user' => 'c9538790_veh_photos',
    'pass' => 'Wreckers12@',
    'charset' => 'utf8mb4'
  ],

  // Optional basic auth for /admin (set to null to disable)
  'admin_auth' => [
    'user' => 'admin',
    'pass' => 'mp12@'
  ],

  // --- Email / PHPMailer settings ---
  // These are read by the create-request page to email the upload link.
  // If you prefer environment variables, each value below will fall back
  // to getenv(...) when present.
  'mail' => [
    'from_email' => getenv('MPMS_MAIL_FROM_EMAIL') ?: 'noreply@towlens.net',
    'from_name'  => getenv('MPMS_MAIL_FROM_NAME')  ?: 'Images | Towlens',
    'bcc'        => getenv('MPMS_MAIL_BCC')        ?: '', // optional, set '' to disable
    // SMTP configuration (set host to '' to send without SMTP)
    'smtp' => [
      'host'   => getenv('MPMS_SMTP_HOST')   ?: 'towlens.net',
      'port'   => (int)(getenv('MPMS_SMTP_PORT') ?: 587),
      'secure' => getenv('MPMS_SMTP_SECURE') ?: 'tls', // 'tls' | 'ssl' | '' (none)
      'user'   => getenv('MPMS_SMTP_USER')   ?: 'noreply@towlens.net',
      'pass'   => getenv('MPMS_SMTP_PASS')   ?: 'Wreckers12@'
    ]
  ],
  
  'auth' => [
  'enable_password_login' => true,       // toggle email+password login
  'reset_expiry_minutes'  => 30,         // lifetime of reset links
  'min_password_length'   => 8,          // new password minimum length
  'allow_legacy_basic'    => true,       // allow fallback to 'admin_auth' creds
  'allow_fallback_for_entra'   => true,
  'default_org_slug' => 'client',
],

];
