<?php
/**
 * Output of the single team post.
 *
 * @package cyberpress/templates
 */

if ( ! defined( 'ABSPATH' ) ) {
    exit;
}

// phpcs:disable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound

$team             = cyberpress()->get_the_team();
$team_country     = $team->get_country_of_foundation();
$team_founded     = $team->get_date_of_foundation_formatted();
$team_game        = $team->get_game();
$team_players     = $team->get_players();
$team_site_url    = $team->get_site_url();
$team_youtube_url = $team->get_youtube_channel_url();
$team_twitch_url  = $team->get_twitch_channel_url();

?>

<?php do_action( 'cyberpress_before_single_team' ); ?>

<article id="post-<?php echo esc_attr( $team->get_id() ); ?>" <?php $team->team_classes(); ?>>

    <?php do_action( 'cyberpress_single_team_title' ); ?>

    <div class="entry-content">

        <?php if ( $team_country || $team_founded || $team_game || $team_site_url || $team_twitch_url || $team_youtube_url || $team_players || '' !== $team->check_thumbnail() ) : ?>
            <div class="cyberpress-team">

                <?php do_action( 'cyberpress_single_team_thumbnail' ); ?>

                <?php do_action( 'cyberpress_single_team_info' ); ?>

            </div>
        <?php endif; ?>

        <?php do_action( 'cyberpress_single_team_content' ); ?>

        <?php do_action( 'cyberpress_single_team_players' ); ?>

        <?php do_action( 'cyberpress_single_team_twitch' ); ?>

        <?php do_action( 'cyberpress_single_team_social' ); ?>

    </div><!-- .entry-content -->

    <?php edit_post_link( __( 'Edit', 'cyberpress' ), '<footer class="entry-footer"><span class="edit-link">', '</span></footer><!-- .entry-footer -->' ); ?>
</article><!-- #post-## -->

<?php do_action( 'cyberpress_after_single_team' ); ?>
