<?php
if (!defined('CUSTAUSU_SUPPORT_DIAGNOSTICS_PUBLIC_KEY')) {
  define(
    'CUSTAUSU_SUPPORT_DIAGNOSTICS_PUBLIC_KEY',
    "-----BEGIN PUBLIC KEY-----\n"
    . "MIIBojANBgkqhkiG9w0BAQEFAAOCAY8AMIIBigKCAYEAzLWolPeDkKl9PrO3lpv5\n"
    . "adyv1sD21AXVwMaXeWDF7btZ6mjSGTnaVz5hB1ZyGE3Tk+olZOHEvOb7etUrKcU2\n"
    . "N6U8U+wkJSxM1dn3dUW22pjgfiJDek5wC8ezGsOm1aFcbwyCEFROuxLbTCuO6mnL\n"
    . "XdN/RQARP7CV/XADF9Vibm3oQkpSZHGk33s9UxdQN4xPxf/hJwJ+Rrz3BrpKNh4/\n"
    . "nr5Xq+kB44HRpsl8TWvpxAKAFv/UdWIyLdIyuEg39FqlK7eMJ9PbYKxXGGUtca0r\n"
    . "L7X/pE1GEpSXQGmdVXufuBgW5/yTVSTe/JCzTQjoqX6+HAoYzbiDlzI4015Dmr3l\n"
    . "1k7hUphQtwh0rWbcKe+7McDZuNV1VS+w8WCjlVf3W+4CFlNW60Zgf9WY8GQ/aZ40\n"
    . "13Z9W/OW8PmNgQzDzCgDdtBeSB9A3eEs6PgQz2GEwNpv4iuaK49Uk0AhsIBzZSdr\n"
    . "gbF1REYl1M3TO4W3ehng+ZG9Zbsw2+T1bWM6Ek1MfqBxAgMBAAE=\n"
    . "-----END PUBLIC KEY-----"
  );
}

/**
 * Public Free package metadata.
 *
 * Contains fixed WordPress.org package identity and public support links only.
 * No commercial license service, external updater or paid-plan resolver is
 * configured or implemented by this file.
 */

if (!defined('ABSPATH')) {
  exit;
}

if (!defined('CUSTAUSU_BUILD_EDITION')) {
  define('CUSTAUSU_BUILD_EDITION', 'freemium_wporg');
}

if (!defined('CUSTAUSU_BUILD_PACKAGE_PLAN')) {
  define('CUSTAUSU_BUILD_PACKAGE_PLAN', 'freemium');
}

if (!defined('CUSTAUSU_BUILD_SUPPORT_URL')) {
  define('CUSTAUSU_BUILD_SUPPORT_URL', 'https://customauthsuite.com/');
}

if (!defined('CUSTAUSU_BUILD_UPGRADE_URL')) {
  define('CUSTAUSU_BUILD_UPGRADE_URL', 'https://customauthsuite.com/');
}

if (!function_exists('custausu_build_value')) {
  function custausu_build_value(string $constant, string $fallback = ''): string {
    if (!defined($constant)) {
      return $fallback;
    }
    $value = constant($constant);
    return is_string($value) ? trim($value) : $fallback;
  }
}

if (!function_exists('custausu_build_url')) {
  function custausu_build_url(string $constant): string {
    $url = custausu_build_value($constant, '');
    return $url !== '' ? rtrim($url, '/') . '/' : '';
  }
}

if (!function_exists('custausu_build_edition')) {
  function custausu_build_edition(): string {
    return 'freemium_wporg';
  }
}

if (!function_exists('custausu_build_package_plan')) {
  function custausu_build_package_plan(): string {
    return 'freemium';
  }
}

if (!function_exists('custausu_build_package_debug_info')) {
  function custausu_build_package_debug_info(): array {
    return [
      'edition' => 'freemium_wporg',
      'package_plan' => 'freemium',
      'allows_freemium' => true,
      'allows_advanced' => false,
      'allows_premium' => false,
    ];
  }
}
