<?php
/**
 * Partial — Settings / Sites tab.
 *
 * @package Contentosapp_Studio
 * @since   3.2.0
 */

defined( 'ABSPATH' ) || exit;
// phpcs:disable WordPress.NamingConventions.PrefixAllGlobals -- Included admin settings template; local presentation variables are scoped to this partial.

$_sites_repo   = costudio_sites();
$_sites_all    = $_sites_repo ? $_sites_repo->get_all() : array();
$_sites_count  = count( $_sites_all );
?>
<div id="fos-tab-sites" class="fos-tab-panel">

	<p class="fos-int-zone-label"><?php esc_html_e( 'Destination Sites', 'contentosapp-studio' ); ?></p>
	<div class="fos-int-card">

		<div class="fos-int-card__header">
			<div class="fos-int-card__left">
				<span class="fos-int-card__icon">🌐</span>
				<div>
					<p class="fos-int-card__title"><?php esc_html_e( 'Destination Sites', 'contentosapp-studio' ); ?></p>
					<p class="fos-int-card__subtitle"><?php esc_html_e( 'Manage WordPress sites where your articles will be published.', 'contentosapp-studio' ); ?></p>
				</div>
			</div>
		</div><!-- /.fos-int-card__header -->

		<div class="fos-int-card__body fos-int-card__body--flush">
			<div id="fos-sites-container">
				<?php include COSTUDIO_DIR . 'admin/views/page-settings-sites.php'; ?>
			</div>
		</div><!-- /.fos-int-card__body -->

	</div><!-- /.fos-int-card -->

	<div class="fos-settings-save-bar">
		<span class="fos-settings-save-bar__hint">💾 <?php esc_html_e( 'Sites are used as publication destinations for your productions.', 'contentosapp-studio' ); ?></span>
		<div class="fos-settings-save-bar__actions">
			<button type="button" class="cts-btn cts-btn--primary fos-add-site-btn">
				+ <?php esc_html_e( 'Add site', 'contentosapp-studio' ); ?>
			</button>
		</div>
	</div>

</div><!-- #fos-tab-sites -->
