<?php

/**
 * Accordion: Feed URL.
 *
 * @link    https://aiopodcasting.com
 * @since   1.0.0
 *
 * @package AiO_Podcast_Studio
 */

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

$feed_url = aiopod_get_rss_feed_url( $post );
?>
<div class="aiopod-form-controls">
	<!-- Field: RSS Feed URL -->
	<div id="aiopod-form-control-feed_url" class="aiopod-form-control">
		<label for="aiopod-field-feed_url" class="aiopod-form-label">
			<?php esc_html_e( 'RSS Feed URL', 'aio-podcast-studio' ); ?>
		</label>

		<div class="aiopod-form-field aiopod-input-group">
			<input type="text" id="aiopod-field-feed_url" class="widefat" value="<?php echo esc_url( $feed_url ); ?>" readonly />
			<button type="button" class="aiopod-copy-url button" data-url="<?php echo esc_url( $feed_url ); ?>">
				<?php esc_html_e( 'Copy RSS Feed', 'aio-podcast-studio' ); ?>
			</button>
		</div>

		<p class="description">
			<?php esc_html_e( 'This is your podcast\'s public RSS feed. Copy and submit it to podcast directories like Apple Podcasts, Spotify, and others.', 'aio-podcast-studio' ); ?>
		</p>
	</div>
</div>
