<?php

namespace EDPW\Core\Controllers\Admin;

use EDPW\Core\Helpers\EmailTemplate;
use EDPW\Core\Helpers\Plugin;
use EDPW\Core\Helpers\WC;

defined('ABSPATH') || exit;


class Labels
{
	/**
	 * Get local data.
	 * @return void
	 */
	public static function getLocalData()
	{
		wp_send_json_success(apply_filters('edpw_local_data', [
			'lang_dir' => is_rtl() ? 'right' : 'left',
			'is_pro' => EmailTemplate::isPro(),
			'is_woo_active' => Plugin::isActive('woocommerce/woocommerce.php'),
			'home_url' => home_url(),
			'ajax_url' => admin_url('admin-ajax.php'),
			'plugin_title' => EDPW_PLUGIN_NAME,
			'version' => 'v' . EDPW_PLUGIN_VERSION,
			'admin_url' => admin_url('admin.php'),
			'available_language' => WC::getAvailableLanguages(),
			'available_email_groups' => EmailTemplate::getEmailGroups(),
			'pricing_page_url' => "https://sparkeditor.com/pricing/?utm_campaign=sparkeditor&utm_medium=pro_url&utm_source=buy-pro",
			'image_date_filter' => self::getImageFilter(),
			'video_tutorials_url' => "https://sparkeditor.com/video-tutorials/?utm_campaign=sparkeditor-link&utm_medium=pro_url&utm_source=video-tutorials",
			'documentation_url' => "https://docs.sparkeditor.com/",
			'nonce' => [
				'label_nonce' => WC::createNonce('label-nonce'),
				'template_list_nonce' => WC::createNonce('edpw-template-list-nonce'),
				'template_nonce' => WC::createNonce('edpw-template-nonce'),
				'setting_nonce' => WC::createNonce('edpw-setting-nonce'),
				'addon_nonce' => WC::createNonce('edpw-addon-nonce'),
			]
		]));
	}

	/**
	 * Get labels.
	 * @return void
	 */
	public static function getLabels()
	{
		if (!WC::isSecurityValid('label-nonce')) {
			wp_send_json_error([
				'message' => esc_html__('Basic check failed', 'email-editor-plus')
			]);
		}
		$image_path = EmailTemplate::getImagePath();
		$app_name = EmailTemplate::isPro() ? "<span style='background-color: #542fe9;color:white;border: 1px none #fff;border-radius: 4px;font-size: 14px;
    padding: 3px 6px;'>" . __('PRO', 'email-editor-plus') . "</span>" : "<span style='background-color: #0088FF;color:white;border: 1px none #fff;border-radius: 4px;font-size: 14px;
    padding: 3px 6px;'>" . __('Free', 'email-editor-plus') . "</span>";
		wp_send_json_success([
			"common" => [
				'app_name' => __('Spark Email Editor', 'email-editor-plus') . ' ' . $app_name,
				'app_version' => 'v' . EDPW_PLUGIN_VERSION,
				'no_records_text' => esc_html__('No records found!', 'email-editor-plus'),
				'templates' => esc_html__('Templates', 'email-editor-plus'),
				'limit' => esc_html__('Limit', 'email-editor-plus'),
				'search' => esc_html__('Search', 'email-editor-plus'),
				'email' => esc_html__('Email', 'email-editor-plus'),
				'settings' => esc_html__('Settings', 'email-editor-plus'),
				'add_ons' => esc_html__('Add-ons', 'email-editor-plus'),
				'recommendations' => esc_html__('Recommendations', 'email-editor-plus'),
				'documentation' => esc_html__('Documentation', 'email-editor-plus'),
				'video_tutorial' => esc_html__('Video tutorial', 'email-editor-plus'),
				'ok_text' => esc_html__('Ok', 'email-editor-plus'),
				'cancel_text' => esc_html__('Cancel', 'email-editor-plus'),
				'get' => esc_html__('Get', 'email-editor-plus'),
				'save' => esc_html__('Save', 'email-editor-plus'),
				'save_and_close' => esc_html__('Save & Close', 'email-editor-plus'),
				'close' => esc_html__('Close', 'email-editor-plus'),
				'mjml_errors' => esc_html__('MJML contains errors', 'email-editor-plus'),
				'previous' => esc_html__('Previous', 'email-editor-plus'),
				'loading' => esc_html__('Loading', 'email-editor-plus'),
				'show_import_success_text' => esc_html__('Code Imported Successfully', 'email-editor-plus'),
				'import_mjml' => esc_html__('Import MJML', 'email-editor-plus'),
				'prev' => esc_html__('Prev', 'email-editor-plus'),
				'next' => esc_html__('Next', 'email-editor-plus'),
				'no_images_found' => esc_html__('No Images found', 'email-editor-plus'),
				'pro_label' => esc_html__('PRO', 'email-editor-plus'),
				'no_results' => esc_html__('No results.', 'email-editor-plus'),
				'pro_feature' => esc_html__('PRO Feature', 'email-editor-plus'),
				'buy_pro' => esc_html__('Buy PRO', 'email-editor-plus'),
				'cancel_alert_title' => esc_html__("Are you sure want to leave ?", 'email-editor-plus'),
				'cancel_alert_desc' => esc_html__("You have not saved the template yet. Click OK to save now", 'email-editor-plus'),
				'cancel_alert_ok' => esc_html__("Ok", 'email-editor-plus'),
				'cancel_alert_cancel' => esc_html__("Close", 'email-editor-plus'),
			],
			"templates" => [
				'template' => esc_html__('Template', 'email-editor-plus'),
				'status' => esc_html__('Status', 'email-editor-plus'),
				'type' => esc_html__('Type', 'email-editor-plus'),
				'actions' => esc_html__('Actions', 'email-editor-plus'),
				'search_templates' => esc_html__('Search templates', 'email-editor-plus'),
				'edit' => esc_html__('edit', 'email-editor-plus'),
				'delete' => esc_html__('delete', 'email-editor-plus'),
				'export' => esc_html__('Export', 'email-editor-plus'),
				'copy_tooltip' => esc_html__('copy template', 'email-editor-plus'),
				'copy_template' => esc_html__('Copy Template', 'email-editor-plus'),
				'copy_temp_desc' => esc_html__('NOTE: Copying the template will overwrite the destination template', 'email-editor-plus'),
				'choose_lang_title' => esc_html__('Choose Language', 'email-editor-plus'),
				'choose_lang_placeholder' => esc_html__('Choose Language', 'email-editor-plus'),
				'choose_template' => esc_html__('Choose Template', 'email-editor-plus'),
				'choose_template_description' => esc_html__('Choose a template to edit', 'email-editor-plus'),
				'choose_template_placeholder' => esc_html__('Choose Template', 'email-editor-plus'),
				'copy_text' => esc_html__('Copy', 'email-editor-plus'),
				'go_copy_template' => esc_html__('Go to the template that is copied', 'email-editor-plus'),
				'select_template_text' => esc_html__('Select template', 'email-editor-plus'),
				'empty_template_text' => esc_html__('No template found', 'email-editor-plus'),
				'delete_alert_title' => esc_html__('Delete Template ?', 'email-editor-plus'),
				'delete_alert_desc' => esc_html__('Are you sure you want to delete the template ? ', 'email-editor-plus'),
				'new_template_alt' => esc_html__('template', 'email-editor-plus'),
				'export_alert_title' => esc_html__('Export Template ?', 'email-editor-plus'),
				'export_alert_desc' => esc_html__('Are you sure you want to export the template ?', 'email-editor-plus'),
			],
			"settings_labels" => [
				
				'license_key_placeholder' => esc_html__('Enter license key', 'email-editor-plus'),
				'title' => esc_html__('Settings', 'email-editor-plus'),
				'save' => esc_html__('Save', 'email-editor-plus'),
				'common' => esc_html__('Common', 'email-editor-plus'),
				'facebook_link' => esc_html__('Facebook link', 'email-editor-plus'),
				'twitter_link' => esc_html__('Twitter link', 'email-editor-plus'),
				'linkedin_link' => esc_html__('Linkedin link', 'email-editor-plus'),
				'pinterest_link' => esc_html__('Pinterest link', 'email-editor-plus'),
				'social_links' => esc_html__('Social links', 'email-editor-plus'),
				'custom_css' => esc_html__('Custom CSS', 'email-editor-plus'),
				'autofix_broken_html' => esc_html__('Automatically repair broken HTML code', 'email-editor-plus'),
				'autofix_broken_html_desc' => esc_html__('Enabling this option will be useful to fix some of the basic HTML errors.', 'email-editor-plus'),
				'direction_settings' => esc_html__('Language Direction', 'email-editor-plus'),
				'activate' => esc_html__('Activate', 'email-editor-plus'),
				'deactivate' => esc_html__('Deactivate', 'email-editor-plus'),
				'status' => esc_html__('Status:', 'email-editor-plus'),
				'language_dir_options' => [
					['value' => 'ltr', 'label' => esc_html__('Left to Right', 'email-editor-plus')],
					['value' => 'rtl', 'label' => esc_html__('Right to Left', 'email-editor-plus')]
				],
			],
			'email_editor_labels' => [
				'logo' => EmailTemplate::getImagePath() . '/editor/logo.png',
				'facebook' => EmailTemplate::getImagePath() . '/editor/facebook.png',
				'twitter' => EmailTemplate::getImagePath() . '/editor/twitter.png',
				'linkedin' => EmailTemplate::getImagePath() . '/editor/linkedin.png',
				'pinterest' => EmailTemplate::getImagePath() . '/editor/pinterest.png',
				'preview' => esc_html__('Preview', 'email-editor-plus'),
				'choose_order_list' => esc_html__('Choose Order List', 'email-editor-plus'),
				'choose_template' => esc_html__('Choose template', 'email-editor-plus'),
				'shortcodes' => esc_html__('Shortcodes', 'email-editor-plus'),
				'send_test_email' => esc_html__('Send test email', 'email-editor-plus'),
				'test_email' => esc_html__('Test Email', 'email-editor-plus'),
				'save' => esc_html__('Save', 'email-editor-plus'),
				'select' => esc_html__('Select...', 'email-editor-plus'),
				'back' => esc_html__('Back', 'email-editor-plus'),
				'iframe_adjust_width' => esc_html__('Adjust the width to check responsiveness', 'email-editor-plus'),
				'send' => esc_html__('Send', 'email-editor-plus'),
				'save_block_action_title' => esc_html__('Save Block Actions', 'email-editor-plus'),
				'no_options_available' => esc_html__('No options available', 'email-editor-plus'),
				'select_a_condition' => esc_html__('Select a condition', 'email-editor-plus'),
				'add_condition' => esc_html__('Add condition', 'email-editor-plus'),
				'edit_condition' => esc_html__('Save condition', 'email-editor-plus'),
				'save_block_action_desc' => esc_html__('Edit or delete the saved blocks', 'email-editor-plus'),
				'clear_canvas_title' => esc_html__('Clear Canvas ?', 'email-editor-plus'),
				'clear_canvas_desc' => esc_html__('Are you sure want to clear the canvas ?', 'email-editor-plus'),
				/*-------mjml-type-name------*/
				'mj_text' => esc_html__('Text', 'email-editor-plus'),
				'mj_image' => esc_html__('Image', 'email-editor-plus'),
				'mj_button' => esc_html__('Button', 'email-editor-plus'),
				'mj_divider' => esc_html__('Divider', 'email-editor-plus'),
				'mj_spacer' => esc_html__('Spacer', 'email-editor-plus'),
				'mj_social' => esc_html__('Social Icons', 'email-editor-plus'),
				'mj_social_element' => esc_html__('Social Element', 'email-editor-plus'),
				'mj_order_summary' => esc_html__('Order Summary', 'email-editor-plus'),
				'mj_section' => esc_html__('Section', 'email-editor-plus'),
				'mj_column' => esc_html__('Column', 'email-editor-plus'),
				'mj_body' => esc_html__('Body', 'email-editor-plus'),

				/*blocks*/
				'layout_category' => esc_html__('Layouts', 'email-editor-plus'),
				'elements_category' => esc_html__('Elements', 'email-editor-plus'),
				'store_elements_category' => esc_html__('Store Elements', 'email-editor-plus'),

				'one_column' => esc_html__('One Column', 'email-editor-plus'),
				'two_column' => esc_html__('Two Column', 'email-editor-plus'),
				'three_column' => esc_html__('Three Column', 'email-editor-plus'),
				'four_column' => esc_html__('Four Column', 'email-editor-plus'),
				'mixed_left_column' => esc_html__('Mixed-Left', 'email-editor-plus'),
				'mixed_right_column' => esc_html__('Mixed-Right', 'email-editor-plus'),

				'title' => esc_html__('Text', 'email-editor-plus'),
				'button' => esc_html__('Button', 'email-editor-plus'),
				'image' => esc_html__('Image', 'email-editor-plus'),
				'divider' => esc_html__('Divider', 'email-editor-plus'),
				'space' => esc_html__('Space', 'email-editor-plus'),
				'header' => esc_html__('Header', 'email-editor-plus'),
				'footer' => esc_html__('Footer', 'email-editor-plus'),
				'heading_1' => esc_html__('Heading 1', 'email-editor-plus'),
				'heading_2' => esc_html__('Heading 2', 'email-editor-plus'),
				'heading_3' => esc_html__('Heading 3', 'email-editor-plus'),
				'social_icons' => esc_html__('Social Icons', 'email-editor-plus'),

				'address' => esc_html__('Address', 'email-editor-plus'),
				'order_summary' => esc_html__('Order Summary', 'email-editor-plus'),
				'order_summary_border' => esc_html__('Table border', 'email-editor-plus'),
				'duplicate_order_summary_title' => esc_html__('Duplicate order summary', 'email-editor-plus'),
				'duplicate_order_summary_desc' => esc_html__('Only one order summary component can be used in a template', 'email-editor-plus'),

				'no_component_select' => esc_html__('No component has been selected. Please choose a component in the canvas to start styling', 'email-editor-plus'),

				/*------shortcodes----*/
				'shortcode_title' => esc_html__('Shortcodes', 'email-editor-plus'),
				'copied_text' => esc_html__('Shortcode copied successfully', 'email-editor-plus'),


				/*styles*/
				'font_size' => esc_html__('Font Size', 'email-editor-plus'),
				'letter_spacing' => esc_html__('Letter Spacing', 'email-editor-plus'),
				'image_traits_title' => esc_html__('Image Settings', 'email-editor-plus'),
				'background' => esc_html__('Background', 'email-editor-plus'),
				'dimension' => esc_html__('Dimension', 'email-editor-plus'),
				'icon_design' => esc_html__('Icon Design', 'email-editor-plus'),
				'text' => esc_html__('Text', 'email-editor-plus'),
				'layout' => esc_html__('Layout', 'email-editor-plus'),
				'spacing' => esc_html__('Spacing', 'email-editor-plus'),
				'borders' => esc_html__('Borders', 'email-editor-plus'),

				/*-------save block labels---*/
				'save_block_alert_title' => esc_html__('Save block content', 'email-editor-plus'),
				'save_block_alert_desc' => esc_html__('Save to reuse this block content in any of your templates', 'email-editor-plus'),
				'save_block_ok_text' => esc_html__('Save Block', 'email-editor-plus'),
				'save_block_cancel_text' => esc_html__('Cancel', 'email-editor-plus'),
				'save_block_label' => esc_html__('Block Name', 'email-editor-plus'),
				'save_block_placeholder' => esc_html__('Name of block', 'email-editor-plus'),
				'cant_save_block_title' => __("Can't save block", 'email-editor-plus'),
				'cant_save_block_desc' => esc_html__("Oops! You need PRO version to save the block", 'email-editor-plus'),

				/*styles manager*/
				'width' => esc_html__('Width', 'email-editor-plus'),
				'font_weight' => esc_html__('Font Weight', 'email-editor-plus'),
				'alignment' => esc_html__('Alignment', 'email-editor-plus'),
				'bgImage' => esc_html__('Background Image', 'email-editor-plus'),
				'addImage' => esc_html__('Add Image', 'email-editor-plus'),
				'replace' => esc_html__('Replace', 'email-editor-plus'),
				'bgPosition' => esc_html__('Background Position', 'email-editor-plus'),
				'bgRepeat' => esc_html__('Background Repeat', 'email-editor-plus'),
				'bgSize' => esc_html__('Background Size', 'email-editor-plus'),
				'bgColor' => esc_html__('Background Color', 'email-editor-plus'),
				'apply_all' => esc_html__('Apply all sides', 'email-editor-plus'),
				'round_corners' => esc_html__('Round Corners', 'email-editor-plus'),
				'font_color' => esc_html__('Font Color', 'email-editor-plus'),
				'container_bg_color' => esc_html__('Container BG Color', 'email-editor-plus'),
				'font_family' => esc_html__('Font Family', 'email-editor-plus'),
				'height' => esc_html__('Height', 'email-editor-plus'),
				'icon_size' => esc_html__('Icon Size', 'email-editor-plus'),
				'border' => esc_html__('Border', 'email-editor-plus'),
				'line_height' => esc_html__('Line Height', 'email-editor-plus'),
				'pixel_unit' => esc_html__('px', 'email-editor-plus'),
				'margin' => esc_html__('Margin', 'email-editor-plus'),
				'padding' => esc_html__('Padding', 'email-editor-plus'),
				'all' => esc_html__('All', 'email-editor-plus'),
				'top' => esc_html__('Top', 'email-editor-plus'),
				'bottom' => esc_html__('Bottom', 'email-editor-plus'),
				'left' => esc_html__('Left', 'email-editor-plus'),
				'right' => esc_html__('Right', 'email-editor-plus'),
				'text_align' => esc_html__('Text Alignment', 'email-editor-plus'),
				'vertical_align' => esc_html__('Vertical Alignment', 'email-editor-plus'),
				'button_padding_x' => esc_html__('Inner Padding X', 'email-editor-plus'),
				'button_padding_y' => esc_html__('Inner Padding Y', 'email-editor-plus'),

				/*traits*/
				'social_element_href_placeholder' => esc_html__('eg. https://google.com', 'email-editor-plus'),
				'link' => esc_html__('Link', 'email-editor-plus'),
				'alt' => esc_html__('Alt', 'email-editor-plus'),
				'button_text' => esc_html__('Button Text', 'email-editor-plus'),
				'button_text_placeholder' => esc_html__('Enter button text', 'email-editor-plus'),
				'add_more' => esc_html__('Add More', 'email-editor-plus'),
				'no_valid_condition_available' => esc_html__('No valid condition available', 'email-editor-plus'),
				'no_condition_available' => esc_html__('No condition available', 'email-editor-plus'),
				'condition_logic_title' => esc_html__('Condition logic', 'email-editor-plus'),
				'add_conditional_logic' => esc_html__('Add conditional logic', 'email-editor-plus'),
				'condition_relationship' => esc_html__('Condition relationship', 'email-editor-plus'),

				/*global labels*/
				'text_accord_title' => esc_html__('Text Appearance', 'email-editor-plus'),
				'button_accord_title' => esc_html__('Button', 'email-editor-plus'),
				'font_styles' => esc_html__('Fonts Styles', 'email-editor-plus'),
				'font_spacing' => esc_html__('Text Spacing', 'email-editor-plus'),
				'text_line_height' => esc_html__('Right', 'email-editor-plus'),
				'text_direction' => esc_html__('Text Direction', 'email-editor-plus'),
				'font_style' => esc_html__('Font Style', 'email-editor-plus'),
				'button_color' => esc_html__('Button Color', 'email-editor-plus'),
				'button_bg_color' => esc_html__('BG color', 'email-editor-plus'),
				'font' => esc_html__('Font Size', 'email-editor-plus'),

				'default_font_family_value' => esc_html__('Helvetica', 'email-editor-plus'),

				/*global labels*/
				'order_summary_trait_title' => esc_html__('Settings', 'email-editor-plus'),
				'show_product_sku' => esc_html__('Show Product SKU', 'email-editor-plus'),
				'show_product_image' => esc_html__('Show Product Image', 'email-editor-plus'),
				'show_product_image_height' => esc_html__('Product Image Height', 'email-editor-plus'),
				'show_product_image_width' => esc_html__('Product Image Width', 'email-editor-plus'),
				'show_product_image_size' => esc_html__('Product Image Size', 'email-editor-plus'),
				'show_payment_instructions' => esc_html__('Show payment instructions', 'email-editor-plus'),

				/*--------common-editor-labels--------*/
				'preview_title' => esc_html__('Preview', 'email-editor-plus'),
				'preview_desc' => esc_html__('This is a modal template you have created', 'email-editor-plus'),

				'image_links' => [
					'image_block_url' => esc_url($image_path . '/editor/blocks/image-placeholder-dark.png'),
					'facebook_image_url' => esc_url($image_path . '/editor/facebook.png'),
					'twitter_image_url' => esc_url($image_path . '/editor/twitter.png'),
					'linkedin_image_url' => esc_url($image_path . '/editor/linkedin.png'),
					'pinterest_image_url' => esc_url($image_path . '/editor/pinterest.png'),
					'social_element_add_more_url' => esc_url($image_path . '/editor/common/social-element-add-image.png'),
					'order_summary' => esc_url($image_path . '/editor/blocks/order-summary.png'),
				],

				"product_size_options" => [
					[
						'value' => 'thumbnail',
						'label' => esc_html__('Thumbnail', 'email-editor-plus')
					],
					[
						'value' => 'full',
						'label' => esc_html__('Full', 'email-editor-plus')
					],
				],

				"condition_relationship_options" => [
					[
						'value' => 'and',
						'label' => esc_html__('And', 'email-editor-plus')
					],
					[
						'value' => 'or',
						'label' => esc_html__('Or', 'email-editor-plus')
					],
				],

				"border_style_options" => [
					[
						'value' => 'none',
						'label' => esc_html__('None', 'email-editor-plus')
					],
					[
						'value' => 'solid',
						'label' => esc_html__('Solid', 'email-editor-plus')
					],
					[
						'value' => 'dotted',
						'label' => esc_html__('Dotted', 'email-editor-plus')
					],
					[
						'value' => 'dashed',
						'label' => esc_html__('Dashed', 'email-editor-plus')
					],
					[
						'value' => 'double',
						'label' => esc_html__('Double', 'email-editor-plus')
					],
					[
						'value' => 'groove',
						'label' => esc_html__('Groove', 'email-editor-plus')
					],
					[
						'value' => 'ridge',
						'label' => esc_html__('Ridge', 'email-editor-plus')
					],
					[
						'value' => 'inset',
						'label' => esc_html__('Inset', 'email-editor-plus')
					],
					[
						'value' => 'outset',
						'label' => esc_html__('Outset', 'email-editor-plus')
					],
				],

				"show_payment_instruction_options" => [
					[
						'value' => 'yes',
						'label' => esc_html__('Yes', 'email-editor-plus')
					],
					[
						'value' => 'no',
						'label' => esc_html__('No', 'email-editor-plus')
					],
					[
						'value' => 'only_customer',
						'label' => esc_html__('Only Customer', 'email-editor-plus')
					],
				],

				"font_family_options" => [
					[
						'value' => 'Arial, Helvetica, sans-serif',
						'label' => esc_html__('Arial', 'email-editor-plus')
					],
					[
						'value' => 'Arial Black, Gadget, sans-serif',
						'label' => esc_html__('Arial Black', 'email-editor-plus')
					],
					[
						'value' => 'Brush Script MT, sans-serif',
						'label' => esc_html__('Brush Script MT', 'email-editor-plus')
					],
					[
						'value' => 'Comic Sans MS, cursive, sans-serif',
						'label' => esc_html__('Comic Sans MS', 'email-editor-plus')
					],
					[
						'value' => 'Courier New, Courier, monospace',
						'label' => esc_html__('Courier New', 'email-editor-plus')
					],
					[
						'value' => 'Georgia, serif',
						'label' => esc_html__('Georgia', 'email-editor-plus')
					],
					[
						'value' => 'Helvetica, sans-serif',
						'label' => esc_html__('Helvetica', 'email-editor-plus')
					],
					[
						'value' => 'Impact, Charcoal, sans-serif',
						'label' => esc_html__('Impact', 'email-editor-plus')
					],
					[
						'value' => 'Lucida Sans Unicode, Lucida Grande, sans-serif',
						'label' => esc_html__('Lucida Sans Unicode', 'email-editor-plus')
					],
					[
						'value' => 'Tahoma, Geneva, sans-serif',
						'label' => esc_html__('Tahoma', 'email-editor-plus')
					],
					[
						'value' => 'Times New Roman, Times, serif',
						'label' => esc_html__('Times New Roman', 'email-editor-plus')
					],
					[
						'value' => 'Trebuchet MS, Helvetica, sans-serif',
						'label' => esc_html__('Trebuchet MS', 'email-editor-plus')
					],
					[
						'value' => 'Verdana, Geneva, sans-serif',
						'label' => esc_html__('Verdana', 'email-editor-plus')
					]
				],

				"all_side_style_property_options" => [
					[
						'value' => 'top',
						'label' => esc_html__('Top', 'email-editor-plus')
					],
					[
						'value' => 'right',
						'label' => esc_html__('Right', 'email-editor-plus')
					],
					[
						'value' => 'bottom',
						'label' => esc_html__('Bottom', 'email-editor-plus')
					],
					[
						'value' => 'left',
						'label' => esc_html__('Left', 'email-editor-plus')
					],
				],


			],
			'add_ons_labels' => [
				'title' => esc_html__('Add-ons', 'email-editor-plus'),
				'active_addon' => esc_html__('Active Add-ons', 'email-editor-plus'),
				'available_addon' => esc_html__('Available Add-ons', 'email-editor-plus'),
				'no_record_found' => esc_html__('No add-ons found at the moment. Please explore the Available Add-ons section.', 'email-editor-plus'),
				'no_record_found_available' => esc_html__('No add-ons found at the moment.', 'email-editor-plus'),
				'Search_addons' => esc_html__('Search', 'email-editor-plus'),
				'download' => esc_html__('Download', 'email-editor-plus'),
				'more_info' => esc_html__('Open', 'email-editor-plus'),
			],
			'recommendations_labels' => [
				
				'learn_more' => esc_html__('Learn more', 'email-editor-plus'),
				'buy' => esc_html__('Buy', 'email-editor-plus'),
				'by' => esc_html__('by', 'email-editor-plus'),
			],
			'select_options' => [
				"limit_options" => [
					[
						'value' => '5',
						'label' => esc_html__('5', 'email-editor-plus')
					],
					[
						'value' => '10',
						'label' => esc_html__('10', 'email-editor-plus')
					],
					[
						'value' => '20',
						'label' => esc_html__('20', 'email-editor-plus')
					],
					[
						'value' => '50',
						'label' => esc_html__('50', 'email-editor-plus')
					],
				],
				"image_select_limit_options" => [
					[
						'value' => '10',
						'label' => esc_html__('10', 'email-editor-plus')
					],
					[
						'value' => '20',
						'label' => esc_html__('20', 'email-editor-plus')
					],
					[
						'value' => '50',
						'label' => esc_html__('50', 'email-editor-plus')
					],
				],
				"addons_limit_options" => [
					[
						'value' => '8',
						'label' => esc_html__('8', 'email-editor-plus')
					],
					[
						'value' => '16',
						'label' => esc_html__('16', 'email-editor-plus')
					],
					[
						'value' => '32',
						'label' => esc_html__('32', 'email-editor-plus')
					],
					[
						'value' => '50',
						'label' => esc_html__('50', 'email-editor-plus')
					],
				],
				"add_on_tabs" => [
					[
						'value' => 'active',
						'label' => esc_html__('Active', 'email-editor-plus')
					],
					[
						'value' => 'available',
						'label' => esc_html__('Available', 'email-editor-plus')
					],
				],
				"editor_topbar_more_options" => [
					[
						'value' => 'send_test_email',
						'label' => esc_html__('Send Test Email', 'email-editor-plus')
					],
				],

				"editor_sidebar_tabs" => [
					[
						'value' => 'contents',
						'label' => esc_html__('Contents', 'email-editor-plus'),
						'icon' => 'content'
					],
					[
						'value' => 'styles',
						'label' => esc_html__('Styles', 'email-editor-plus'),
						'icon' => 'style',
					],
					[
						'value' => 'global_styles',
						'label' => esc_html__('Global', 'email-editor-plus'),
						'icon' => 'global',
					],
				],
			],
		]);
	}

	public static function getImageFilter()
	{
		global $wpdb, $wp_locale;
		$arc_query = "SELECT DISTINCT YEAR(post_date) AS yyear, MONTH(post_date) AS mmonth FROM $wpdb->posts WHERE post_type = 'attachment' ORDER BY post_date DESC";

		$arc_result = $wpdb->get_results($arc_query);
		$date_filter = [['value' => '0', 'label' => __('All Dates', 'email-editor-plus')]];
		foreach ($arc_result as $arc_row) {
			if (0 == $arc_row->yyear) {
				continue;
			}
			$arc_row->mmonth = zeroise($arc_row->mmonth, 2);
			$date_filter[] = [
				'value' => esc_attr($arc_row->yyear . '|' . $arc_row->mmonth),
				'label' => esc_html($wp_locale->get_month($arc_row->mmonth) . " $arc_row->yyear")
			];
		}

		return $date_filter;
	}
}