<?php
/**
 * Global helper functions (wordpress.org distribution).
 *
 * @package PhoenixWP\PriceLabels
 */

declare(strict_types=1);

defined( 'ABSPATH' ) || exit;

/**
 * Whether PhoenixWP Core is active.
 */
function phoenix_wp_price_labels_is_core_active(): bool {
	return defined( 'PHOENIX_WP_CORE_VERSION' ) || class_exists( \PhoenixWP\Core\Plugin::class );
}

/**
 * Whether this build is the wordpress.org directory distribution.
 */
function phoenix_wp_price_labels_is_org_build(): bool {
	return defined( 'PHOENIX_PRICE_LABELS_FOR_WOOCOMMERCE_ORG_BUILD' ) && PHOENIX_PRICE_LABELS_FOR_WOOCOMMERCE_ORG_BUILD;
}

/**
 * Short admin page title (under PhoenixWP Core submenu).
 */
function phoenix_wp_price_labels_get_admin_page_title(): string {
	return __( 'Price Labels', 'phoenix-price-labels-for-woocommerce' );
}

/**
 * Top-level admin menu title (standalone without Core).
 */
function phoenix_wp_price_labels_get_admin_menu_title(): string {
	return __( 'PhoenixWP Price Labels', 'phoenix-price-labels-for-woocommerce' );
}

/**
 * Plugin list / registry display name.
 */
function phoenix_wp_price_labels_get_plugin_display_name(): string {
	return 'Phoenix Price Labels for WooCommerce';
}

/**
 * Whether WooCommerce is active.
 */
function phoenix_wp_price_labels_is_woocommerce_active(): bool {
	return class_exists( 'WooCommerce' ) || function_exists( 'WC' );
}

/**
 * Whether the admin product picker supports per-product repeat quantities (Pro only).
 */
function phoenix_wp_price_labels_admin_picker_repeat_enabled(): bool {
	return false;
}
