<?php
$youtube_url_embed = get_sub_field('youtube_url');
$full_width_video_or_include_text = get_sub_field('full_width_video_or_include_text');
$video_on_left_or_right = get_sub_field('video_on_left_or_right');
$title = get_sub_field('title');
$text_area = get_sub_field('text_area');
if($video_on_left_or_right == 'right') {
	$pos = 'right-m';
} else {
	$pos = '';
}
?>
<div class='island-light island-bottom-margin'>
<?php if($youtube_url_embed):?>

	<?php if($full_width_video_or_include_text == 'full_width'):?>

		<section class='video clear island-half container no-padding'>
			<div class='col-12'>
			<div class="embed-container">
				<?php echo $youtube_url_embed; ?>
			</div>
			<div>
		</div>

	<?php elseif($full_width_video_or_include_text == 'video_text'): ?>

		<section class='video clear island-half container no-padding'>
			<div class='col-12 col-6-m <?php echo $video_on_left_or_right;?>'>
				<div class="embed-container">
					<?php echo $youtube_url_embed; ?>
				</div>
			</div>
			<div class='col-12 col-6-m'>
				<?php if($title):?>
					<h2><?php echo $title; ?></h2>
				<?php endif; ?>
				<?php if($text_area):?>
					<?php echo strip_tags($text_area, '<br><p><a>');;?>
				<?php endif;?>
			</div>
		</div>

	<?php endif;?>
<?php endif; ?>
</div>
