<?php
    $image = get_field( 'image' );
    $image_position = get_field( 'image_position' );
    $image_size = get_field( 'image_size' );
    $background_color = get_field( 'background_color' );
?>

<?php if($image || have_rows('text_blocks')): ?>
    <section class="image-text background--<?php echo e($background_color); ?>">
        <div class='row <?php if($image_position): ?> reverse <?php endif; ?>'>
            <?php if(have_rows('text_blocks')): ?>
                <div class="col-xs-12 <?php if($image_size): ?> col-md-5 <?php else: ?> col-md-6 <?php endif; ?>">
                    <div class="image-text__content">
                        <?php while(have_rows('text_blocks')): ?>
                            <?php
                                the_row();
                            ?>
                            <?php if(get_row_layout() == 'heading_big'): ?>
                                <?php echo $__env->make('blocks.image-text.heading', ['size' => 'big'], \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
                            <?php elseif(get_row_layout() == 'heading_small'): ?>
                                <?php echo $__env->make('blocks.image-text.heading', ['size' => 'small'], \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
                            <?php elseif(get_row_layout() == 'descriptor'): ?>
                                <?php echo $__env->make('blocks.image-text.descriptor', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
                            <?php elseif(get_row_layout() == 'list'): ?>
                                <?php echo $__env->make('blocks.image-text.list', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
                            <?php elseif(get_row_layout() == 'paragraph'): ?>
                                <?php echo $__env->make('blocks.image-text.paragraph', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
                            <?php elseif(get_row_layout() == 'links'): ?>
                                <?php echo $__env->make('blocks.image-text.links', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
                            <?php elseif(get_row_layout() == 'accordion'): ?>
                                <?php echo $__env->make('blocks.image-text.accordion', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
                            <?php endif; ?>
                        <?php endwhile; ?>
                    </div>
                </div>
            <?php endif; ?>
            <div class="col-md-1"></div>
            <?php if($image): ?>
                <div class='col-xs-12 <?php if($image_size): ?> col-md-6 <?php else: ?> col-md-5 <?php endif; ?>'>
                    <div class="image-text__image">
                        <?php echo $__env->make('elements.image', ['image_id' => $image], \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
                    </div>
                </div>
            <?php endif; ?>
            
            
        </div>
    </section>
<?php endif; ?><?php /**PATH D:\Projekti\WordPress\aphea\public\app\themes\aphea\resources\views/gutenberg/image-text.blade.php ENDPATH**/ ?>