<?php 

namespace WPVOFW;

class DefaultSettings{

    public static function get_default_settings(){

        $settings = [
            'show_feedback_form' => 'both', // no, on_order_details, on_thankyou_page, both
            'form_type' => 'floating', // floating, embed
            
            'embed_position_thankyou_page' => 'before_thankyou', 
            'embed_position_thankyou_page_custom' => [
                'hook' => '',
                'priority' => 10
            ],

            'embed_position_order_details' => 'before_order_details',
            'embed_position_order_details_custom' => [
                'hook' => '',
                'priority' => 10
            ],

            'floating_position' => 'right', // right, left
            'form_title' => esc_html__('Feedback', 'order-feedback-woo'),
            'form_description' => esc_html__('Please provide your feedback', 'order-feedback-woo'),
            'form_button_text' => esc_html__('Submit Feedback', 'order-feedback-woo'),
            'form_success_message' => esc_html__('Thank you for your feedback', 'order-feedback-woo'),
            'form_error_message' => esc_html__('An error occurred. Please try again later', 'order-feedback-woo'),
            'form_fields'   => [
                [
                    'key' => 'title',
                    'label' => 'Title',
                    'placeholder' => 'Title',
                    'visible' => true
                ],
                [
                    'key'   => 'message',
                    'label' => esc_attr('Message', 'order-feedback-woo'),
                    'placeholder' => esc_attr('Message', 'order-feedback-woo'),
                    'visible' => true
                ],
                [
                    'key'   => 'rating',
                    'label' => esc_attr('Rate your Experience', 'order-feedback-woo'),
                    'rating_style' => 'number', // number, star, emoji
                    'visible' => true,
                    'rating_scale' => 5,// 5,10
                ]
            ],
            'email_settings' => [
                // emable admin email
                'enable_admin_email' => true,
                'admin_email' => get_option('admin_email'),
                'admin_email_subject' => esc_html__('New Feedback Received', 'order-feedback-woo'),
                'admin_email_message' => esc_html__('New feedback has been received. Please check the feedback in the admin panel', 'order-feedback-woo'),

                // enable customer email
                'enable_customer_email' => true,
                'customer_email_subject' => esc_html__('Thank you for your feedback', 'order-feedback-woo'),
                'customer_email_message' => esc_html__('Thank you for your feedback. We appreciate your time', 'order-feedback-woo'),
                
            ]

        ];

        $settings = apply_filters('wpvofw/default_settings', $settings);

        return $settings;
    
    }
}