<?php
declare(strict_types=1);

// config.php
// -----------------------------------------------------------------------------
// Generated by /install (web/CLI). Safe to re-run installer to rewrite values.
// -----------------------------------------------------------------------------

// PayPal REST API (storefront)
if (!defined('PAYPAL_CLIENT_ID')) define('PAYPAL_CLIENT_ID', '');
if (!defined('PAYPAL_SECRET')) define('PAYPAL_SECRET', '');
if (!defined('PAYPAL_SANDBOX')) define('PAYPAL_SANDBOX', true);

// CashApp storefront (owner cashtag)
if (!defined('CASHAPP_CASHTAG')) define('CASHAPP_CASHTAG', '$');

$defaults = array (
  'db' => 
  array (
    'host' => 'localhost',
    'name' => 'diziproo_berat111',
    'user' => 'diziproo_berat111',
    'pass' => '0vZk]{~~T2+8',
    'charset' => 'utf8mb4',
  ),
  'session_name' => 'iptv_admin_session',
  'base_url' => 'https://25.diz1.online/',
  'secret_key' => '664B5v8zXrRKITJ2Km8Tq0umyybEN9CnzPDvgmfYq7pQWGwghQKqJU6g4dDscGCj',
  'token_ttl' => 604800,
  'sub_cache_ttl' => 60,
  'strict_device_id' => false,
  'webhook_url' => '',
  'device_window' => 300,
  'segment_window' => 1800,
  'max_ip_changes' => 3,
  'max_ip_window' => 600,
);

// Optional local overrides (kept for backwards-compat; not required)
$local_path = __DIR__ . '/config.local.php';
$local = [];
if (is_file($local_path)) {
  $tmp = require $local_path;
  if (is_array($tmp)) $local = $tmp;
}

$merged = array_replace_recursive($defaults, $local);
return $merged;
