<?php

/**
 * Accordion: Follow Us Buttons.
 *
 * @link    https://aiopodcasting.com
 * @since   1.0.0
 *
 * @package AiO_Podcast_Studio
 */

// Exit if accessed directly
if ( ! defined( 'WPINC' ) ) {
	die;
}

$facebook_url  = isset( $post_meta['facebook_url'] ) ? $post_meta['facebook_url'][0] : '';
$twitter_url   = isset( $post_meta['twitter_url'] ) ? $post_meta['twitter_url'][0] : '';
$instagram_url = isset( $post_meta['instagram_url'] ) ? $post_meta['instagram_url'][0] : '';
$linkedin_url  = isset( $post_meta['linkedin_url'] ) ? $post_meta['linkedin_url'][0] : '';
$youtube_url   = isset( $post_meta['youtube_url'] ) ? $post_meta['youtube_url'][0] : '';
?>
<div class="aiopod-form-controls">
	<div class="aiopod-notice aiopod-notice-info">
		<?php esc_html_e( 'Add links to your social media profiles so listeners can follow and connect with your show.', 'aio-podcast-studio' ); ?>
	</div>

	<div class="aiopod-form-grid">
		<!-- Field: Facebook Page URL -->
		<div id="aiopod-form-control-facebook_url" class="aiopod-form-control">
			<label for="aiopod-field-facebook_url" class="aiopod-form-label">
				<?php esc_html_e( 'Facebook Page URL', 'aio-podcast-studio' ); ?>
			</label>
			
			<div class="aiopod-form-field">
				<input type="text" name="facebook_url" id="aiopod-field-facebook_url" class="widefat" placeholder="https://www.facebook.com/your-page-name" value="<?php echo esc_url( $facebook_url ); ?>" />
			</div>

			<p class="description">
				<?php esc_html_e( 'Optional. The official Facebook page for this podcast or profile.', 'aio-podcast-studio' ); ?>
			</p>
		</div>

		<!-- Field: Twitter / X Profile URL -->
		<div id="aiopod-form-control-twitter_url" class="aiopod-form-control">
			<label for="aiopod-field-twitter_url" class="aiopod-form-label">
				<?php esc_html_e( 'Twitter / X Profile URL', 'aio-podcast-studio' ); ?>
			</label>
			
			<div class="aiopod-form-field">
				<input type="text" name="twitter_url" id="aiopod-field-twitter_url" class="widefat" placeholder="https://x.com/username" value="<?php echo esc_url( $twitter_url ); ?>" />
			</div>

			<p class="description">
				<?php esc_html_e( 'Optional. The official Twitter / X profile for this podcast or profile.', 'aio-podcast-studio' ); ?>
			</p>
		</div>

		<!-- Field: Instagram Profile URL -->
		<div id="aiopod-form-control-instagram_url" class="aiopod-form-control">
			<label for="aiopod-field-instagram_url" class="aiopod-form-label">
				<?php esc_html_e( 'Instagram Profile URL', 'aio-podcast-studio' ); ?>
			</label>
			
			<div class="aiopod-form-field">
				<input type="text" name="instagram_url" id="aiopod-field-instagram_url" class="widefat" placeholder="https://www.instagram.com/username" value="<?php echo esc_url( $instagram_url ); ?>" />
			</div>

			<p class="description">
				<?php esc_html_e( 'Optional. The official Instagram profile for this podcast or profile.', 'aio-podcast-studio' ); ?>
			</p>
		</div>

		<!-- Field: LinkedIn Page URL -->
		<div id="aiopod-form-control-linkedin_url" class="aiopod-form-control">
			<label for="aiopod-field-linkedin_url" class="aiopod-form-label">
				<?php esc_html_e( 'LinkedIn Page URL', 'aio-podcast-studio' ); ?>
			</label>
			
			<div class="aiopod-form-field">
				<input type="text" name="linkedin_url" id="aiopod-field-linkedin_url" class="widefat" placeholder="https://www.linkedin.com/company/your-page-name" value="<?php echo esc_url( $linkedin_url ); ?>" />
			</div>

			<p class="description">
				<?php esc_html_e( 'Optional. The official LinkedIn page for this podcast or profile.', 'aio-podcast-studio' ); ?>
			</p>
		</div>

		<!-- Field: YouTube Channel URL -->
		<div id="aiopod-form-control-youtube_url" class="aiopod-form-control">
			<label for="aiopod-field-youtube_url" class="aiopod-form-label">
				<?php esc_html_e( 'YouTube Channel URL', 'aio-podcast-studio' ); ?>
			</label>
			
			<div class="aiopod-form-field">
				<input type="text" name="youtube_url" id="aiopod-field-youtube_url" class="widefat" placeholder="https://www.youtube.com/@channelname" value="<?php echo esc_url( $youtube_url ); ?>" />
			</div>

			<p class="description">
				<?php esc_html_e( 'Optional. The official YouTube channel for this podcast or profile.', 'aio-podcast-studio' ); ?>
			</p>
		</div>
	</div>	
</div>