@model EForT.Models.AccountsModel

<div id="subscription-list-table">
    <table id="subscription-list" class="table table-striped table-bordered user-table table-responsive-md">
        <thead>
            <tr>
                <th scope="col" style="width:10%" class="text-center">Status</th>
                <th scope="col" style="width:60%" class="text-center">Subscription Type</th>
                <th scope="col" style="width:30%" class="text-center">Option</th>
            </tr>
        </thead>
        <tbody>
            <tr>
                @{
                    try
                    {
                        if (Model.SubscriptionList.First().PaidStatus == true && Model.SubscriptionList.First().Status == "active")
                        {

                            <td align="center"><i class="fa fa-check font-medium-3"></i></td>
                        }
                        else
                        {
                            <td align="center"><i class="fa fa-times font-medium-3"></i></td>
                        }
                    }
                    catch (Exception ex)
                    {
                        <td align="center"><i class="fa fa-times font-medium-3"></i></td>
                    }
                }
                <td align="center">Regular Subscription</td>
                @{

                        if (!Model.SubscriptionList.Any() || Model.SubscriptionList.First().Status == "canceled")
                        {
                            <td align="center"><button type="button" class="btn btn-icon btn-pure secondary js-subscribe-button" data-url="@Url.Action("CreateSubscription", "Accounts")">Subscribe <i class="fa fa-plus"></i></button></td>
                        }
                        else
                        {
                            <td align="center"><button type="button" class="btn btn-icon btn-pure secondary js-cancel-subscription" data-url="@Url.Action("DeleteSubscription", "Accounts")">Unsubscribe <i class="fa fa-trash"></i></button></td>
                        }
                }
            </tr>
                
        </tbody>
    </table>
</div>


