<?php
declare(strict_types=1);

/**
 * Footer Inner — Copyright, SNS icons, Business info.
 *
 * @package WTE_Business_Card
 * @since   1.0.0
 */

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

$wte_business_name = get_theme_mod( 'wte_business_name', '' );
$wte_owner_name    = get_theme_mod( 'wte_owner_name', '' );
$wte_site_name     = $wte_business_name ?: $wte_owner_name ?: get_bloginfo( 'name' );
$wte_sns_in_footer = get_theme_mod( 'wte_sns_display_footer', true );
?>
<div class="wte-container">
	<div class="wte-footer__inner">
		<?php if ( $wte_sns_in_footer && function_exists( 'wte_render_sns_icons' ) ) : ?>
			<div class="wte-footer__sns">
				<?php wte_render_sns_icons( 'footer' ); ?>
			</div>
		<?php endif; ?>

		<div class="wte-footer__info">
			<?php if ( $wte_site_name ) : ?>
				<p class="wte-footer__name"><?php echo esc_html( $wte_site_name ); ?></p>
			<?php endif; ?>
		</div>

		<div class="wte-footer__copyright">
			<p>&copy; <?php echo esc_html( (string) date( 'Y' ) ); ?> <?php echo esc_html( $wte_site_name ); ?>. <?php esc_html_e( 'All Rights Reserved.', 'wte_' ); ?></p>
		</div>
	</div>
</div>
