<?php
/**
 * Dynamic qr
 *
 * @since  1.0.0
 *
 * @category  WordPress_Plugin
 * @package   QrCdr
 * @author    Nicola Franchini
 * @link      http://veno.es
 */

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}
$qrcdr_sidebarorder = 'left' == $qrcdr_sidebar ? ' order-last qrcdr-order-md-first' : ' order-last';
?>
<div class="container-fluid qrcdr qrcdr-app" id="qrcdr-block-<?php echo esc_attr( $form_id ); ?>" data-id="<?php echo esc_attr( $form_id ); ?>">
	<div class="qrcdr-parent-container">
	<div class="qrcdr-row mt-3">
		<div class="qrcdr-sidebar<?php echo esc_attr( $qrcdr_sidebarorder ); ?>">
			<?php require __DIR__ . '/placeholder.php'; ?>
		</div>

		<div class="qrcdr-main-col mb-3">

			<ul class="nav nav-tabs qrcdr-step-nav mb-3" role="tablist">
				
				<?php do_action( 'qrcdr_wp_before_generator_menu', $form_id ); ?>
				
				<li class="nav-item" role="presentation">
					<button class="nav-link qrcdr-content-tab active" data-bs-toggle="tab" data-bs-target="#pills-content-<?php echo esc_attr( $form_id ); ?>" type="button" role="tab" aria-controls="pills-content-<?php echo esc_attr( $form_id ); ?>" aria-selected="false"><?php esc_html_e( 'Content', 'qrcdr' ); ?></button>
				</li>
<?php
if ( count( $qrcdr_features ) > 0 ) {
	?>
				<li class="nav-item" role="presentation">
					<button class="nav-link qrcdr-edit-tab" data-bs-toggle="tab" data-bs-target="#pills-style-<?php echo esc_attr( $form_id ); ?>" type="button" role="tab" aria-controls="pills-style-<?php echo esc_attr( $form_id ); ?>" aria-selected="false"><?php esc_html_e( 'Style', 'qrcdr' ); ?></button>
				</li>
	<?php
}
?>
				<?php do_action( 'qrcdr_wp_after_generator_menu', $hook_data ); ?>
			</ul>

			<div class="tab-content">

				<?php do_action( 'qrcdr_wp_before_main_tabs', $hook_data ); ?>

				<div class="tab-pane fade show active shadow p-3" id="pills-content-<?php echo esc_attr( $form_id ); ?>" role="tabpanel" tabindex="0">
					<div class="row">
						<?php qrcdr_renderer()->render_service_nav( $qrcdr_tabs, $form_id, $getsection, $hook_data ); ?>
						<div class="col-12">
							<div class="tab-content qrcdr-features-section">
								<?php
								do_action( 'qrcdr_wp_before_generator_services', $hook_data );

								$qrcdr_tab_data = qrcdr_blueprint()->get_tabs();
								foreach ( $qrcdr_tabs as $tab_key ) {
									if ( isset( $qrcdr_tab_data[ $tab_key ] ) ) {
										qrcdr_renderer()->render_service( $qrcdr_tab_data[ $tab_key ], $tab_key, $form_id, $getsection );
									}
								}
								do_action( 'qrcdr_wp_after_generator_services', $hook_data );
								?>
							</div>
							<?php do_action( 'qrcdr_wp_after_features', $hook_data ); ?>
						</div>
					</div>
				</div> <!-- /#pills-content -->

				<div class="tab-pane fade" id="pills-style-<?php echo esc_attr( $form_id ); ?>" role="tabpanel" tabindex="0">
					<div class="row">
						<div class="col-12 pb-2">
							<div class="qrcdr-options qrcdr-options-section">
								<?php qrcdr_renderer()->render_feature_accordion( $qrcdr_features, $form_id, $single, $collapsed ); ?>
							</div>
						</div>
					</div>
				</div>

				<?php do_action( 'qrcdr_wp_after_main_tabs', $hook_data ); ?>

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

			<input type="hidden" name="qrcdr_id" class="form-control qrcdr-dynamic-id" disabled>
			<input type="hidden" class="send-qrcdr-style" value="">
			<input type="hidden" class="send-qrcdr-content" value="">

		</div><!-- /.col-lg-8 -->
	</div><!-- /.row -->
	</div><!-- /.row -->
</div><!-- /.container-fluid -->
