<?php
/**
 * Agency Pulse Update Checker Configuration
 * Agency Pulse - Admin Customizer & Menu Organizer
 */

return array(
	'plugin' => array(
		'name'             => 'Agency Pulse - Admin Menu Organizer',
		'slug'             => 'agency-pulse-admin-menu',
		'file'             => 'agency-pulse-admin-menu.php',
		'version_constant' => 'AGENCY_PULSE_ADMIN_MENU_VERSION',
	),

	'update' => array(
		'url'            => defined( 'APWP_DOMAIN' )
			? APWP_DOMAIN . '/agency-pulse-admin-menu.json'
			: ( getenv( 'AAMO_UPDATE_URL' ) ?: 'http://laravel/agency-pulse-admin-menu.json' ),
		'check_interval' => 12,
	),

	'cache' => array(
		'key_prefix'  => 'apwp_ao_',
		'ttl_seconds' => 86400,
	),

	'identifiers' => array(
		'prefix'     => 'apwp_ao',
		'css_prefix' => 'apwp-ao',
		'js_object'  => 'apwpAdminMenu',
	),

	'ui' => array(
		'modal_id'               => 'apwp-ao-update-modal',
		'modal_class'            => 'AgencyPulseModalAO',
		'button_id'              => 'apwp-ao-update-button',
		'spinner_id'             => 'apwp-ao-update-spinner',
		'always_show_check_link' => true,
	),

	'backup' => array(
		'enabled'    => true,
		'keep_count' => 3,
		'use_gzip'   => true,
	),

	'debug' => array(
		'show_cache_clear_link' => true,
	),

	'validation' => array(
		'min_file_size_mb'   => 0.01,
		'max_file_size_mb'   => 50,
		'min_file_count'     => 5,
		'required_main_file' => true,
	),

	'authentication' => array(
		'enabled'             => true,
		'source'              => 'agencypulse',
		'token'               => getenv( 'APWP_ADMIN_MENU_UPDATE_TOKEN' ),
		'pro_connector_class' => 'AgencyPulseWP_Connector',
	),

	'logging' => array(
		'enabled'   => defined( 'WP_DEBUG' ) && WP_DEBUG,
		'log_file'  => WP_CONTENT_DIR . '/debug-update-checker.log',
		'log_level' => 'debug',
	),
);
