<?php

$plugin_url = SOFT_MULTIMEDIA_PLAYER_URL;

$faqs = [
	[
		'question' => __( 'How many player types does the Multimedia Player offer?', 'soft-multimedia-player' ),
		'answer'   => __( 'The Multimedia Player offers 3 distinct player types to suit different media formats: Audio Player for music and sound files, Video Player for visual media, and Podcast Player specifically designed for streaming podcast episodes.', 'soft-multimedia-player' ),
	],
	[
		'question' => __( 'Is the Multimedia Player responsive and mobile-friendly?', 'soft-multimedia-player' ),
		'answer'   => __( 'Yes, the Multimedia Player is fully responsive and mobile-friendly. It automatically adapts to different screen sizes and devices, ensuring a smooth and consistent user experience on smartphones, tablets, and desktops.', 'soft-multimedia-player' ),
	],
	[
		'question' => __( 'Does the player support multiple audio source types?', 'soft-multimedia-player' ),
		'answer'   => __( 'Yes, the Multimedia Player supports multiple audio source types. Examples include MP3, AAC, OGG, and WAV formats, allowing for broad compatibility with various audio files.', 'soft-multimedia-player' ),
	],
	[
		'question' => __( 'Does the player support YouTube videos as a source?', 'soft-multimedia-player' ),
		'answer'   => __( 'Yes, the Multimedia Player supports YouTube videos as a source. You can easily embed and play YouTube content directly within the player.', 'soft-multimedia-player' ),
	],
	[
		'question' => __( 'Which video file formats are supported?', 'soft-multimedia-player' ),
		'answer'   => __( 'The Multimedia Player supports a wide range of popular video file formats, including MP4, WebM, OGG, and MOV.', 'soft-multimedia-player' ),
	],
	[
		'question' => __( 'Does the player support podcast RSS feeds?', 'soft-multimedia-player' ),
		'answer'   => __( 'Yes, the Multimedia Player supports podcast RSS feeds. You can easily integrate RSS feed URLs to automatically fetch and play the latest podcast episodes.', 'soft-multimedia-player' ),
	],
	[
		'question' => __( 'Can I customize the player controls?', 'soft-multimedia-player' ),
		'answer'   => __( 'Yes, the Multimedia Player allows you to customize the player controls. You can choose which buttons to display—such as play, pause, skip, volume, and fullscreen to match your brand or user preferences.', 'soft-multimedia-player' ),
	],
	[
		'question' => __( 'Can I customize the appearance of the player?', 'soft-multimedia-player' ),
		'answer'   => __( 'Yes, you can customize the appearance of the Multimedia Player. It supports custom colors, themes, and styling options, allowing you to match the player’s look and feel with your brand or website design.', 'soft-multimedia-player' ),
	],
	[
		'question' => __( 'Does the Multimedia Player offer multiple skins?', 'soft-multimedia-player' ),
		'answer'   => __( 'Yes, the Multimedia Player offers multiple pre-designed modern skins for the audio, video, and podcast players. These skins provide stylish, ready-to-use designs that enhance the user experience and can be easily applied without custom coding.', 'soft-multimedia-player' ),
	],
	[
		'question' => __( 'If I need support, what should I do?', 'soft-multimedia-player' ),
		'answer'   => __( 'If you need support, simply create a support ticket describing the issue you\'re experiencing. Be sure to include any relevant details or steps to reproduce the problem to help the support team assist you more efficiently.', 'soft-multimedia-player' ),
	],
];

$services = [
	[
		'key'         => 'documentation',
		'title'       => __( 'Read our Documentation', 'soft-multimedia-player' ),
		'description' => __( 'Read our official step by step documentation guide on each and every products we build. In our guide we made everything easy for you.', 'soft-multimedia-player' ),
		'button'      => __( 'Documentation', 'soft-multimedia-player' ),
		'url'         => 'https://softlabbd.com/docs/'
	],
	[
		'key'         => 'contact',
		'title'       => __( 'Contact with us', 'soft-multimedia-player' ),
		'description' => __( 'Do you have any feedback regarding the radio player plugin?. Having any issue or any feedback? Let\'s know it', 'soft-multimedia-player' ),
		'button'      => __( 'Contact us', 'soft-multimedia-player' ),
		'url'         => 'https://softlabbd.com/contact/'
	]
];

?>

<div id="help" class="getting-started-content">

    <div class="content-heading">
        <h2><?php esc_html_e( 'Frequently Asked Questions', 'soft-multimedia-player' ); ?></h2>
        <p><?php esc_html_e( 'Find quick answers to common queries in our FAQ section.', 'soft-multimedia-player' ); ?></p>
    </div>

    <section class="section-faq">
		<?php foreach ( $faqs as $index => $faq ): ?>
            <div class="faq-item">
                <div class="faq-header">
                    <i class="dashicons dashicons-arrow-down-alt2"></i>
                    <h3><?php echo esc_html( $faq['question'] ); ?></h3>
                </div>
                <div class="faq-body">
                    <p><?php echo wp_kses_post( $faq['answer'] ); ?></p>
                </div>
            </div>
		<?php endforeach; ?>
    </section>

    <div class="content-heading">
        <h2><?php esc_html_e( 'Need Help?', 'soft-multimedia-player' ); ?></h2>
        <p><?php esc_html_e( 'Read our knowledge base documentation or contact us directly.', 'soft-multimedia-player' ); ?></p>
    </div>

    <div class="section-wrap">
		<?php foreach ( $services as $service ): ?>
            <section class="section-<?php echo $service['key']; ?> section-half">
                <div class="col-image">
                    <img src="<?php echo esc_url( $plugin_url . '/assets/images/dashboard/' . $service['key'] . '.png' ); ?>"
                         alt="<?php echo esc_attr( $service['key'] ); ?>">
                </div>

                <div class="col-description">
                    <h3><?php echo esc_html( $service['title'] ); ?></h3>
                    <p><?php echo esc_html( $service['description'] ); ?></p>
                    <a class="smp-btn btn-primary" href="<?php echo esc_url( $service['url'] ); ?>"
                       target="_blank"><?php echo esc_html( $service['button'] ); ?></a>
                </div>

            </section>
		<?php endforeach; ?>
    </div>
</div>

<script>
    jQuery(document).ready(function ($) {
        $('.faq-item .faq-header').on('click', function () {
            $(this).parent().toggleClass('active');
        });
    });
</script>
