<?php
namespace OxygenApp\Config;
if ( ! defined( 'ABSPATH' ) ) exit;

class DefaultLabels {

    static function getLabelDataFromName(string $name): ?array {
        $defaultLangData = self::getDefaultLanguage();
        $labels = $defaultLangData['labels'] ?? [];

        $out = null;
        $index = array_search($name, array_column($labels, 'name'));
        if ($index !== false) {
            $out = $labels[$index];
        }
        return $out;
    }

    static function getDefaultLanguage(): array {
        return [
            'code' => 'gb', 
            'rtl' => '',
            'labels' => [
                [
                    'label' => esc_html__('Default logo text', 'oxyleaf-app-working-and-relaxing-app'),
                    'name' => 'default_logo_text',
                    'value' => 'Oxygen',
                ],
                [
                    'label' => esc_html__('Sign Up popup title', 'oxyleaf-app-working-and-relaxing-app'),
                    'name' => 'signup_popup_title',
                    'value' => 'Sign Up',
                ],
                [
                    'label' => esc_html__('Sign Up button', 'oxyleaf-app-working-and-relaxing-app'),
                    'name' => 'signup_btn',
                    'value' => 'Signup',
                ],
                [
                    'label' => esc_html__('Login button', 'oxyleaf-app-working-and-relaxing-app'),
                    'name' => 'login_btn',
                    'value' => 'Login',
                ],
                [
                    'label' => esc_html__('Sign Up title', 'oxyleaf-app-working-and-relaxing-app'),
                    'name' => 'signup_title',
                    'value' => 'Sign Up for a Free account',
                    'info' => esc_html__('Supports HTML', 'oxyleaf-app-working-and-relaxing-app'),
                ],
                [
                    'label' => esc_html__('Sign Up Google button', 'oxyleaf-app-working-and-relaxing-app'),
                    'name' => 'signup_google_btn',
                    'value' => 'Sign Up with Google',
                ],
                [
                    'label' => esc_html__('Sign Up with email', 'oxyleaf-app-working-and-relaxing-app'),
                    'name' => 'signup_email',
                    'value' => 'Or Sign Up with email',
                ],
                [
                    'label' => esc_html__('Email placeholder', 'oxyleaf-app-working-and-relaxing-app'),
                    'name' => 'email_placeholder',
                    'value' => 'Email',
                ],
                [
                    'label' => esc_html__('Settings btn', 'oxyleaf-app-working-and-relaxing-app'),
                    'name' => 'settings_btn',
                    'value' => 'Settings',
                ],
                [
                    'label' => esc_html__('Support btn, top dropdown', 'oxyleaf-app-working-and-relaxing-app'),
                    'name' => 'support_btn_top',
                    'value' => 'Support',
                ],
                [
                    'label' => esc_html__('Logout btn, top dropdown', 'oxyleaf-app-working-and-relaxing-app'),
                    'name' => 'logout_btn_top',
                    'value' => 'Logout',
                ],
                [
                    'label' => esc_html__('Sign Up Google button', 'oxyleaf-app-working-and-relaxing-app'),
                    'name' => 'signup_google_btn',
                    'value' => 'Sign Up with Google',
                ],
                [
                    'label' => esc_html__('Sign Up with email', 'oxyleaf-app-working-and-relaxing-app'),
                    'name' => 'signup_email',
                    'value' => 'Or Sign Up with email',
                ],
                [
                    'label' => esc_html__('Email placeholder', 'oxyleaf-app-working-and-relaxing-app'),
                    'name' => 'email_placeholder',
                    'value' => 'Email',
                ],
                [
                    'label' => esc_html__('Password placeholder', 'oxyleaf-app-working-and-relaxing-app'),
                    'name' => 'password_placeholder',
                    'value' => 'Password',
                ],
                [
                    'label' => esc_html__('Sign Up / Login terms agreement', 'oxyleaf-app-working-and-relaxing-app'),
                    'name' => 'signup_login_terms_agreement',
                    'value' => 'I agree to OxygenApp\'s <strong><a class="app-default-link" href="#" target="_blank">Terms & Privacy</a></strong>',
                    'info' => esc_html__('Supports HTML', 'oxyleaf-app-working-and-relaxing-app'),
                ],
                [
                    'label' => esc_html__('Sign Up form button', 'oxyleaf-app-working-and-relaxing-app'),
                    'name' => 'sign_up_form_btn',
                    'value' => 'Sign Up',
                ],
                [
                    'label' => esc_html__('Already registered label', 'oxyleaf-app-working-and-relaxing-app'),
                    'name' => 'already_registered',
                    'value' => 'Already registered?',
                ],
                [
                    'label' => esc_html__('LogIn link label', 'oxyleaf-app-working-and-relaxing-app'),
                    'name' => 'login_link_label',
                    'value' => 'LogIn',
                ],
                [
                    'label' => esc_html__('Password restriction', 'oxyleaf-app-working-and-relaxing-app'),
                    'name' => 'password_restriction',
                    'value' => 'Min 7 characters, at least one number',
                ],
                [
                    'label' => esc_html__('Sign Up success info', 'oxyleaf-app-working-and-relaxing-app'),
                    'name' => 'signup_success_info',
                    'value' => 'You have successfully created a new account. Click the link in the email to verify your account.',
                    'info' => esc_html__('Supports HTML', 'oxyleaf-app-working-and-relaxing-app'),
                ],
                [
                    'label' => esc_html__('Resend activation link', 'oxyleaf-app-working-and-relaxing-app'),
                    'name' => 'resend_activation_btn',
                    'value' => esc_html__('Resend activation link', 'oxyleaf-app-working-and-relaxing-app'),
                ],
                [
                    'label' => esc_html__('Resent activation link info', 'oxyleaf-app-working-and-relaxing-app'),
                    'name' => 'resend_activation_info',
                    'value' => 'We resent the activation link <br>please check your email, also check your spam folder.',
                    'info' => esc_html__('Supports HTML', 'oxyleaf-app-working-and-relaxing-app'),
                ],
                [
                    'label' => esc_html__('Back to Log In', 'oxyleaf-app-working-and-relaxing-app'),
                    'name' => 'back_to_login',
                    'value' => 'Back to Log In',
                ],
                [
                    'label' => esc_html__('General success title', 'oxyleaf-app-working-and-relaxing-app'),
                    'name' => 'general_success_title',
                    'value' => 'Success!',
                ],
                [
                    'label' => esc_html__('Account activated info', 'oxyleaf-app-working-and-relaxing-app'),
                    'name' => 'account_acctivated_info',
                    'value' => 'Your account has been activated. Please log in.',
                ],
                [
                    'label' => esc_html__('Back to Sign Up', 'oxyleaf-app-working-and-relaxing-app'),
                    'name' => 'back_to_signup',
                    'value' => 'Back to Sign Up',
                ],
                [
                    'label' => esc_html__('Unknown error', 'oxyleaf-app-working-and-relaxing-app'),
                    'name' => 'unknown_error',
                    'value' => 'Something went wront, please contact support',
                ],
                [
                    'label' => esc_html__('General error title', 'oxyleaf-app-working-and-relaxing-app'),
                    'name' => 'general_error_title',
                    'value' => 'Error!',
                ],
                [
                    'label' => esc_html__('Invalid activation code', 'oxyleaf-app-working-and-relaxing-app'),
                    'name' => 'invalid_activation_token',
                    'value' => 'Invalid activation code',
                ],
                [
                    'label' => esc_html__('Email placeholder', 'oxyleaf-app-working-and-relaxing-app'),
                    'name' => 'email_placeholder',
                    'value' => 'Email',
                ],
                [
                    'label' => esc_html__('Re-send activation code', 'oxyleaf-app-working-and-relaxing-app'),
                    'name' => 'resend_activation_code_btn',
                    'value' => 'Re-send activation code',
                ],
                [
                    'label' => esc_html__('Account activated info', 'oxyleaf-app-working-and-relaxing-app'),
                    'name' => 'account_acctivated_info',
                    'value' => 'Your account has been activated. Please log in.',
                ],
                [
                    'label' => esc_html__('Log In title', 'oxyleaf-app-working-and-relaxing-app'),
                    'name' => 'login_title',
                    'value' => 'Log In to your account',
                ],
                [
                    'label' => esc_html__('Log In with Google button', 'oxyleaf-app-working-and-relaxing-app'),
                    'name' => 'login_google_btn',
                    'value' => 'Log In with Google',
                ],
                [
                    'label' => esc_html__('Login with email', 'oxyleaf-app-working-and-relaxing-app'),
                    'name' => 'login_email',
                    'value' => 'Or Log In with your email',
                ],
                [
                    'label' => esc_html__('Log in form button', 'oxyleaf-app-working-and-relaxing-app'),
                    'name' => 'login_form_btn',
                    'value' => 'Log In',
                ],
                [
                    'label' => esc_html__('Forgot password', 'oxyleaf-app-working-and-relaxing-app'),
                    'name' => 'forgot_password',
                    'value' => 'Forgot password?',
                ],
                [
                    'label' => esc_html__("Don't have an account label", 'oxyleaf-app-working-and-relaxing-app'),
                    'name' => 'dont_have_an_account_label',
                    'value' => "Don't have an account?",
                ],
                [
                    'label' => esc_html__('Sign Up link label', 'oxyleaf-app-working-and-relaxing-app'),
                    'name' => 'signup_link_label',
                    'value' => 'Sign Up',
                ],
                [
                    'label' => esc_html__('Log-In success info', 'oxyleaf-app-working-and-relaxing-app'),
                    'name' => 'login_success_complete_info',
                    'value' => 'You have successfully logged in.',
                    'info' => esc_html__('Supports HTML', 'oxyleaf-app-working-and-relaxing-app'),
                ],
                [
                    'label' => esc_html__('Forgot password title', 'oxyleaf-app-working-and-relaxing-app'),
                    'name' => 'forgot_passw_title',
                    'value' => 'Forgot your password?',
                    'info' => esc_html__('Supports HTML', 'oxyleaf-app-working-and-relaxing-app'),
                ],
                [
                    'label' => esc_html__('Forgot password about', 'oxyleaf-app-working-and-relaxing-app'),
                    'name' => 'forgot_password_about',
                    'value' => 'Please enter your email address',
                ],
                [
                    'label' => esc_html__('Reset password button', 'oxyleaf-app-working-and-relaxing-app'),
                    'name' => 'reset_password_btn',
                    'value' => 'Reset password',
                ],
                [
                    'label' => esc_html__('Request reset password success info', 'oxyleaf-app-working-and-relaxing-app'),
                    'name' => 'reset_password_success_info',
                    'value' => 'We have sent you an email with the reset link. Click the link to reset your password.',
                    'info' => esc_html__('Supports HTML', 'oxyleaf-app-working-and-relaxing-app'),
                ],
                [
                    'label' => esc_html__('Reset password title', 'oxyleaf-app-working-and-relaxing-app'),
                    'name' => 'reset_passw_title',
                    'value' => 'Reset your password',
                    'info' => esc_html__('Supports HTML', 'oxyleaf-app-working-and-relaxing-app'),
                ],
                [
                    'label' => esc_html__('Reset password about', 'oxyleaf-app-working-and-relaxing-app'),
                    'name' => 'reset_password_about',
                    'value' => 'Please enter a new password',
                ],
                [
                    'label' => esc_html__('Reset password success info', 'oxyleaf-app-working-and-relaxing-app'),
                    'name' => 'reset_password_success_complete_info',
                    'value' => 'You have successfully reset the password. Please log-in.',
                    'info' => esc_html__('Supports HTML', 'oxyleaf-app-working-and-relaxing-app'),
                ],
                [
                    'label' => esc_html__('User playlists title', 'oxyleaf-app-working-and-relaxing-app'),
                    'name' => 'user_playlists_title',
                    'value' => 'My playlists',
                ],
                [
                    'label' => esc_html__('New playlist label', 'oxyleaf-app-working-and-relaxing-app'),
                    'name' => 'new_playlist_btn_label',
                    'value' => 'New playlist',
                ],
                [
                    'label' => esc_html__('Edit playlist label', 'oxyleaf-app-working-and-relaxing-app'),
                    'name' => 'edit_playlist',
                    'value' => 'Edit playlist',
                ],
                [
                    'label' => esc_html__('Play playlist label', 'oxyleaf-app-working-and-relaxing-app'),
                    'name' => 'play_playlist',
                    'value' => 'Play playlist',
                ],
                [
                    'label' => esc_html__('User remove playlist label', 'oxyleaf-app-working-and-relaxing-app'),
                    'name' => 'remove_playlist',
                    'value' => 'Remove playlist',
                ],
                [
                    'label' => esc_html__('No playlist found info', 'oxyleaf-app-working-and-relaxing-app'),
                    'name' => 'no_playlist_found',
                    'value' => "No playlists found, you can start by creating one.",
                ],
                [
                    'label' => esc_html__('Playlist create restriction', 'oxyleaf-app-working-and-relaxing-app'),
                    'name' => 'playlist_create_restriction',
                    'value' => "Only logged-in users can create playlists.",
                ],
                [
                    'label' => esc_html__('New playlist title', 'oxyleaf-app-working-and-relaxing-app'),
                    'name' => 'new_playlist_title',
                    'value' => "New playlist",
                ],

                [
                    'label' => esc_html__('New playlist input placeholder', 'oxyleaf-app-working-and-relaxing-app'),
                    'name' => 'new_playlist_placeholder',
                    'value' => "playlist name",
                ],
                [
                    'label' => esc_html__('Save playlist button label', 'oxyleaf-app-working-and-relaxing-app'),
                    'name' => 'save_playlist_btn_label',
                    'value' => "Save",
                ],
                [
                    'label' => esc_html__('Select playlist background button label', 'oxyleaf-app-working-and-relaxing-app'),
                    'name' => 'select_playlist_background_btn_label',
                    'value' => "Select playlist background",
                ],
                [
                    'label' => esc_html__('Clear playlist background button label', 'oxyleaf-app-working-and-relaxing-app'),
                    'name' => 'clear_playlist_background_btn_label',
                    'value' => "Clear",
                ],
                [
                    'label' => esc_html__('New playlist info', 'oxyleaf-app-working-and-relaxing-app'),
                    'name' => 'new_playlist_info',
                    'value' => "Select sounds, add a playlist name and save.",
                ],
                [
                    'label' => esc_html__('Playlist login required', 'oxyleaf-app-working-and-relaxing-app'),
                    'name' => 'playlist_login_required',
                    'value' => "You must be logged in to create a playlist",
                ],
                [
                    'label' => esc_html__('Missing user', 'oxyleaf-app-working-and-relaxing-app'),
                    'name' => 'missing_user',
                    'value' => "User does not exist. Please sign up",
                ],
                [
                    'label' => esc_html__('User max playlists', 'oxyleaf-app-working-and-relaxing-app'),
                    'name' => 'free_user_max_playlists',
                    'value' => "You have reached the maximum number of playlists allowed.",
                ],
                [
                    'label' => esc_html__('User max playlist sounds', 'oxyleaf-app-working-and-relaxing-app'),
                    'name' => 'free_user_max_playlists_sounds',
                    'value' => "You have reached the maximum number of sounds allowed in a playlist.",
                ],
                [
                    'label' => esc_html__('Edit playlist', 'oxyleaf-app-working-and-relaxing-app'),
                    'name' => 'edit_playlist',
                    'value' => "Edit",
                ],
                [
                    'label' => esc_html__('Edit playlist popup title', 'oxyleaf-app-working-and-relaxing-app'),
                    'name' => 'edit_playlist_popup_title',
                    'value' => "Edit playlist",
                ],
                [
                    'label' => esc_html__('Remove playlist', 'oxyleaf-app-working-and-relaxing-app'),
                    'name' => 'remove_playlist',
                    'value' => "Remove",
                ],
                [
                    'label' => esc_html__('Select background', 'oxyleaf-app-working-and-relaxing-app'),
                    'name' => 'select_background_popup_title',
                    'value' => "Select default background",
                ],
                [
                    'label' => esc_html__('Image backgrounds', 'oxyleaf-app-working-and-relaxing-app'),
                    'name' => 'image_backgrounds',
                    'value' => "Image backgrounds",
                ],
                [
                    'label' => esc_html__('Video backgrounds', 'oxyleaf-app-working-and-relaxing-app'),
                    'name' => 'video_backgrounds',
                    'value' => "Video backgrounds",
                ],
                [
                    'label' => esc_html__('All backgrounds', 'oxyleaf-app-working-and-relaxing-app'),
                    'name' => 'all_backgrounds_label',
                    'value' => "All",
                ],
                [
                    'label' => esc_html__('Clear', 'oxyleaf-app-working-and-relaxing-app'),
                    'name' => 'clear',
                    'value' => "Clear",
                ],
                [
                    'label' => esc_html__('Missing background', 'oxyleaf-app-working-and-relaxing-app'),
                    'name' => 'missing_background',
                    'value' => "Missing background",
                ],
                [
                    'label' => esc_html__('Background login required error', 'oxyleaf-app-working-and-relaxing-app'),
                    'name' => 'background_login_required_err',
                    'value' => "You must be logged in to set a default background",
                ],
                [
                    'label' => esc_html__('User Account title', 'oxyleaf-app-working-and-relaxing-app'),
                    'name' => 'user_settings_title',
                    'value' => 'My Account',
                ],
                [
                    'label' => esc_html__('Delete Account Section Title', 'oxyleaf-app-working-and-relaxing-app'),
                    'name' => 'delete_account_section_title',
                    'value' => "Delete Account",
                ],
                [
                    'label' => esc_html__('User settings tab title', 'oxyleaf-app-working-and-relaxing-app'),
                    'name' => 'user_settings_tab_title',
                    'value' => "Settings",
                ],
                [
                    'label' => esc_html__('Show Time and Date Label', 'oxyleaf-app-working-and-relaxing-app'),
                    'name' => 'show_time_date_label',
                    'value' => "Show Time and Date",
                ],
                [
                    'label' => esc_html__('Show Time and Date Description', 'oxyleaf-app-working-and-relaxing-app'),
                    'name' => 'show_time_date_description',
                    'value' => "Display the current time and date on your screen",
                ],
                [
                    'label' => esc_html__('Daily Sleep Time Label', 'oxyleaf-app-working-and-relaxing-app'),
                    'name' => 'daily_sleep_time_label',
                    'value' => "Daily Sleep Time",
                ],
                [
                    'label' => esc_html__('Daily Sleep Time Description', 'oxyleaf-app-working-and-relaxing-app'),
                    'name' => 'daily_sleep_time_description',
                    'value' => "Enable automatic sleep timer that stops playback at a scheduled time each day",
                ],
                [
                    'label' => esc_html__('Daily Sleep Time Picker Label', 'oxyleaf-app-working-and-relaxing-app'),
                    'name' => 'daily_sleep_time_picker_label',
                    'value' => "Stop sounds at",
                ],
                [
                    'label' => esc_html__('Delete Account Description', 'oxyleaf-app-working-and-relaxing-app'),
                    'name' => 'delete_account_description',
                    'value' => "Permanently delete your account and all associated data. This action cannot be undone.",
                ],
                [
                    'label' => esc_html__('Delete Account Button', 'oxyleaf-app-working-and-relaxing-app'),
                    'name' => 'delete_account_btn',
                    'value' => "Delete Account",
                ],
                [
                    'label' => esc_html__('Delete Account Confirmation Title', 'oxyleaf-app-working-and-relaxing-app'),
                    'name' => 'delete_account_confirmation_title',
                    'value' => "Are you sure you want to delete your account?",
                ],
                [
                    'label' => esc_html__('Delete Account Confirmation Message', 'oxyleaf-app-working-and-relaxing-app'),
                    'name' => 'delete_account_confirmation_message',
                    'value' => "This will permanently delete your account and all your data. This action cannot be undone.",
                ],
                [
                    'label' => esc_html__('Delete Account Confirm Button', 'oxyleaf-app-working-and-relaxing-app'),
                    'name' => 'delete_account_confirm_btn',
                    'value' => "Yes, Delete My Account",
                ],
                [
                    'label' => esc_html__('Delete Account Cancel Button', 'oxyleaf-app-working-and-relaxing-app'),
                    'name' => 'delete_account_cancel_btn',
                    'value' => "Cancel",
                ],
                [
                    'label' => esc_html__('Delete Account Success Message', 'oxyleaf-app-working-and-relaxing-app'),
                    'name' => 'delete_account_success_message',
                    'value' => "Your account has been successfully deleted.",
                ],
                [
                    'label' => esc_html__('Delete Account Error Message', 'oxyleaf-app-working-and-relaxing-app'),
                    'name' => 'delete_account_error_message',
                    'value' => "Failed to delete account. Please try again.",
                ],
                [
                    'label' => esc_html__('Sleep mode title', 'oxyleaf-app-working-and-relaxing-app'),
                    'name' => 'sleep_mode_title',
                    'value' => "Sleep mode",
                ],
                [
                    'label' => esc_html__('Sleep mode info', 'oxyleaf-app-working-and-relaxing-app'),
                    'name' => 'sleep_mode_info',
                    'value' => "Click to exist sleep mode",
                ]
            ]
        ];
    }
}