<?php
	
	use MeowCrew\CancellationOffers\Core\ServiceContainer;
	use MeowCrew\CancellationOffers\SurveyAnswers\SurveyAnswersPage\SurveyAnswersPage;
	use MeowCrew\CancellationOffers\SurveyAnswers\SurveyAnswersPage\SurveyAnswersWPListTable;
	
	defined( 'ABSPATH' ) || die;
	
	$container   = ServiceContainer::getInstance();
	$fileManager = $container->getFileManager();
	
	/**
	 * Available variables
	 *
	 * @var SurveyAnswersWPListTable $feedbacks_table
	 */
?>
<div class="wrap">
	<h1><?php esc_html_e( 'Survey Answers', 'cancellation-surveys-offers-woocommerce-subscriptions' ); ?></h1>
  
	<form id="reviews-filter" method="get" action="<?php admin_url( 'edit.php' ); ?>">
		<?php $currentPage = isset( $_REQUEST['page'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['page'] ) ) : SurveyAnswersPage::PAGE_SLUG; ?>

		<input type="hidden" name="page" value="<?php echo esc_attr( $currentPage ); ?>"/>
		<?php $feedbacks_table->views(); ?>
		<?php $feedbacks_table->display(); ?>
	</form>
</div>
