<?php
/**
 * http://pluginscorner.com
 *
 * @package plco-membership
 */

use \PLCOMembership\admin\classes\PLCOM_Const;

if ( ! defined( 'ABSPATH' ) ) {
	exit; // Silence is golden
}

?>

<h5><?php _e( 'View Memberhip', PLCOM_Const::T ) ?></h5>

<div class="row">
	<div class="col s12">
		<h6><strong><?php _e( 'Membership Data', PLCOM_Const::T ) ?></strong></h6>
	</div>
	<div class="col s2">
		<strong><?php _e( 'Member Name', PLCOM_Const::T ) ?>:</strong>
	</div>
	<div class="col s10">
		<span><#= model.get("user").data.display_name #></span>
	</div>
	<div class="col s2">
		<strong><?php _e( 'Member Email', PLCOM_Const::T ) ?>:</strong>
	</div>
	<div class="col s10">
		<span><#= model.get("user").data.user_email #></span>
	</div>
	<div class="col s2">
		<strong><?php _e( 'Member Role', PLCOM_Const::T ) ?>:</strong>
	</div>
	<div class="col s10">
		<span><#= model.get("user").roles[0] #></span>
	</div>
	<div class="col s2">
		<strong><?php _e( 'Purchased Membership', PLCOM_Const::T ) ?>:</strong>
	</div>
	<div class="col s10">
		<span><#= model.get("membership").membership_name #></span>
	</div>
	<div class="col s2">
		<strong><?php _e( 'Membership State', PLCOM_Const::T ) ?>:</strong>
	</div>
	<div class="col s10">
		<span><#= model.get("state") #></span>
	</div>
	<div class="col s2">
		<strong><?php _e( 'Member Since', PLCOM_Const::T ) ?>:</strong>
	</div>
	<div class="col s10">
		<span><#= model.get("membership").created_at #></span>
	</div>
	<div class="col s2">
		<strong><?php _e( 'Next Billing date', PLCOM_Const::T ) ?>:</strong>
	</div>
	<div class="col s10">
		<span><#= model.get("next_billing_date") ?? 'NEVER' #></span>
	</div>
	<div class="col s2">
		<strong><?php _e( 'Membership Expires At', PLCOM_Const::T ) ?>:</strong>
	</div>
	<div class="col s10">
		<span><#= model.get("expires_at") ? model.get("expires_at") : "NEVER" #></span>
	</div>
	<div class="col s2">
		<strong><?php _e( 'Is Complementary', PLCOM_Const::T ) ?>:</strong>
	</div>
	<div class="col s10">
		<span><#= parseInt(model.get("complementary")) ? "Yes" : "No" #></span>
	</div>
	<div class="plcom-memberships-extra"></div>
</div>

<div class="row">
	<div class="col s12 plco-user-membership-payments"></div>
</div>


<div class="row">
	<div class="col s12">
		<a href="javascript:window.history.back()" class="btn grey waves-light"><?php _e( 'Go Back', PLCOM_Const::T ) ?></a>
	</div>
</div>
