<?php

// phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedNamespaceFound -- APD is the established namespace shared with the Pro add-on and retained for backward compatibility.
namespace APD\Support;

defined('ABSPATH') || exit;

final class MetaKeys
{
    public const LEGACY_THEME = '_apd_theme';
    public const LEGACY_LAYOUT = '_apd_layout';
    public const LEGACY_MODULES = '_apd_modules';
    public const LEGACY_PERMISSIONS = '_apd_permissions';
    public const LEGACY_VIEWS = '_apd_views';
    public const LEGACY_DRAWING_ZONES = '_apd_drawing_zones';
    public const LEGACY_FONTS = '_apd_fonts';
    public const LEGACY_UPLOAD = '_apd_upload';
    public const LEGACY_COLORS = '_apd_colors';
    public const LEGACY_PRICING_RULES = '_apd_pricing_rules';
    public const LEGACY_PRICING_RULE_IDS = '_apd_pricing_rule_ids';
    public const LEGACY_MODE = '_apd_mode';
    public const LEGACY_SELECTION_MENU = '_apd_selection_menu';
    public const LEGACY_UI = '_apd_ui';
    public const LEGACY_FRONT_BEHAVIOR = '_apd_front_behavior';
    public const LEGACY_MOBILE_BEHAVIOR = '_apd_mobile_behavior';
    public const LEGACY_INITIAL_DOCUMENT = '_apd_initial_document';
    public const LEGACY_INITIAL_STATE = '_apd_initial_state';
    public const LEGACY_ASSET_FILTERS = '_apd_asset_filters';
    public const LEGACY_TEMPLATE_ID = '_apd_template_id';

    public const TEMPLATE_LAYOUT_CONFIG = '_apd_template_layout_config';
    public const TEMPLATE_EDITOR_STATE = '_apd_template_editor_state';

    public const PRODUCT_CONFIG_CONTENT_STATE = '_apd_product_config_content_state';
    public const PRODUCT_CONFIG_EDITOR_STATE = '_apd_product_config_editor_state';
    public const PRODUCT_CONFIG_THEME_CONFIG = '_apd_product_config_theme_config';
    public const PRODUCT_CONFIG_PRICING_CONFIG = '_apd_product_config_pricing_config';
    public const PRODUCT_CONFIG_TEMPLATE_ID = '_apd_product_config_template_id';

    public static function templateKeys() : array
    {
        return [
            self::LEGACY_THEME,
            self::LEGACY_LAYOUT,
            self::LEGACY_MODULES,
            self::LEGACY_PERMISSIONS,
            self::LEGACY_VIEWS,
            self::LEGACY_DRAWING_ZONES,
            self::LEGACY_FONTS,
            self::LEGACY_UPLOAD,
            self::LEGACY_COLORS,
            self::LEGACY_PRICING_RULES,
            self::LEGACY_PRICING_RULE_IDS,
            self::LEGACY_MODE,
            self::LEGACY_SELECTION_MENU,
            self::LEGACY_FRONT_BEHAVIOR,
            self::LEGACY_MOBILE_BEHAVIOR,
            self::LEGACY_INITIAL_DOCUMENT,
            self::LEGACY_INITIAL_STATE,
            self::LEGACY_ASSET_FILTERS,
            self::TEMPLATE_LAYOUT_CONFIG,
            self::TEMPLATE_EDITOR_STATE,
        ];
    }

    public static function productConfigKeys() : array
    {
        return [
            self::LEGACY_THEME,
            self::LEGACY_LAYOUT,
            self::LEGACY_MODULES,
            self::LEGACY_PERMISSIONS,
            self::LEGACY_VIEWS,
            self::LEGACY_DRAWING_ZONES,
            self::LEGACY_FONTS,
            self::LEGACY_UPLOAD,
            self::LEGACY_COLORS,
            self::LEGACY_PRICING_RULES,
            self::LEGACY_PRICING_RULE_IDS,
            self::LEGACY_MODE,
            self::LEGACY_SELECTION_MENU,
            self::LEGACY_FRONT_BEHAVIOR,
            self::LEGACY_MOBILE_BEHAVIOR,
            self::LEGACY_INITIAL_DOCUMENT,
            self::LEGACY_INITIAL_STATE,
            self::LEGACY_ASSET_FILTERS,
            self::LEGACY_TEMPLATE_ID,
            self::PRODUCT_CONFIG_CONTENT_STATE,
            self::PRODUCT_CONFIG_EDITOR_STATE,
            self::PRODUCT_CONFIG_THEME_CONFIG,
            self::PRODUCT_CONFIG_PRICING_CONFIG,
            self::PRODUCT_CONFIG_TEMPLATE_ID,
        ];
    }

    public static function jsonKeys() : array
    {
        return [
            self::LEGACY_THEME,
            self::LEGACY_LAYOUT,
            self::LEGACY_MODULES,
            self::LEGACY_PERMISSIONS,
            self::LEGACY_VIEWS,
            self::LEGACY_DRAWING_ZONES,
            self::LEGACY_FONTS,
            self::LEGACY_UPLOAD,
            self::LEGACY_COLORS,
            self::LEGACY_PRICING_RULES,
            self::LEGACY_PRICING_RULE_IDS,
            self::LEGACY_SELECTION_MENU,
            self::LEGACY_FRONT_BEHAVIOR,
            self::LEGACY_MOBILE_BEHAVIOR,
            self::LEGACY_INITIAL_DOCUMENT,
            self::LEGACY_INITIAL_STATE,
            self::LEGACY_ASSET_FILTERS,
            self::TEMPLATE_LAYOUT_CONFIG,
            self::TEMPLATE_EDITOR_STATE,
            self::PRODUCT_CONFIG_CONTENT_STATE,
            self::PRODUCT_CONFIG_EDITOR_STATE,
            self::PRODUCT_CONFIG_THEME_CONFIG,
            self::PRODUCT_CONFIG_PRICING_CONFIG,
        ];
    }
}
