@extends('mix::layouts.master') @section('title', __('Affiliate')) @section('namespace', 'user-mix-settings-affiliate') @section('content') @section('back-button', route('user-mix-settings'))
@if (!__o_feature('feature.affiliate'))
{!! ori('Delivery', 'package-box-door', 'w-16 h-16') !!}
{{ __('Upgrade your plan') }}
{{ __('Your plan does not support this feature. Upgrade to access.') }}
{{ __('Upgrade') }}
@endif
{{ __('Affiliate') }}
{{ __("Referral Link") }}
{!! orion('priority-warning-1', 'w-3 h-3') !!}
{!! orion('config-1', 'h-5 w-5') !!}

{{ nr($referrals) }}

{{ __('Referrals') }}
{!! orion('priority-warning-1', 'w-3 h-3') !!}
{!! orion('people-1', 'h-5 w-5') !!}

{{ nr($converted_referrals) }}

{{ __('Converted Referrals') }}
{!! orion('priority-warning-1', 'w-3 h-3') !!}
{!! orion('bank-check-1', 'h-5 w-5') !!}

{!! str_replace('Free', '0', price_with_cur(\Currency::symbol(settings('payment.currency')), $pending_affiliate_amount)) !!}

{{ __('Pending Withdrawal') }}
{!! orion('priority-warning-1', 'w-3 h-3') !!}
{!! orion('pay-1', 'h-5 w-5') !!}

{!! str_replace('Free', '0', price_with_cur(\Currency::symbol(settings('payment.currency')), $approved_affiliate_amount)) !!}

{{ __('Approved Withdrawal') }}
{{ __('Withdraw Earnings') }}
{{ __('Amount') }} {{ __('Status') }} {{ __('Date') }}
@foreach ($withdrawals as $item)
{!! str_replace('Free', '0', price_with_cur(\Currency::symbol(settings('payment.currency')), $item->amount)) !!} {{ $item->note }}
@if ($item->is_paid) {!! orion('checkmark-1', 'w-3 h-3') !!} {{ __('Approved') }} @else {!! orion('hidden-1', 'w-3 h-3') !!} {{ __('Pending') }} @endif
{{ \Carbon\Carbon::parse($item->created_at)->toFormattedDateString() }}
@endforeach
@if ($pending_withdrawal)
{{ __('Please, wait...') }}

{{ __('Please wait while we review your previous pending withdrawal before we can process another.') }}

@else
{{ __('Withdrawal') }}
{!! __('Once you reach at least :price, you can create a withdrawal request.', ['price' => str_replace('Free', '0', price_with_cur(\Currency::symbol(settings('payment.currency')), settings("affiliate.min_withdrawal")))]) !!}
@csrf

{{ settings("affiliate.withdrawal_notes") }}

@endif
@endsection