@extends($activeTemplate . 'layouts.master')
<meta name="csrf-token" content="{{ csrf_token() }}">

@section('content')
    <div class="transaction-section padding-top padding-bottom">
        <div class="container">
            <div class="card text-center">
                <div class="card-header">
                    <h3 class="card-title">Download our App</h3>
                </div>
                <div class="card-body">

                    <a href="{{ $plan->app_link }}" target="_blank" class="text-decoration-underline h5">Download now</a>

                    @if (auth()->user()->network_activated_at)
                        <form id="confirmationForm" action="{{ route('user.download.app.link') }}" method="POST"
                            class="mt-3 d-flex justify-content-center align-items-center flex-column">
                            @csrf
                            <div class="form-check mb-3">
                                <input class="form-check-input" type="checkbox" value="1" id="app_downloaded"
                                    name="app_downloaded" @checked(auth()->user()->app_downloaded_at)>
                                <label class="form-check-label" for="app_downloaded">
                                    Yes I have Downloaded & signed up app
                                </label>
                            </div>
                            <button type="submit" id="confirmYes" class="btn btn-success" @disabled(auth()->user()->app_downloaded_at)>
                                @if(auth()->user()->app_downloaded_at) @lang('Confirmed') @else @lang('Confirm') @endif
                            </button>
                        </form>
                    @endif
                </div>
            </div>
        </div>
    </div>

    @push('script')
        <script>
            $(document).ready(function() {

            });
        </script>
    @endpush

    @push('script')
        <script>

        </script>
    @endpush
@endsection
