@props(['expires_at' => null, 'state' => 'active']) @php $days = $expires_at != null ? abs((int)\Carbon\Carbon::createFromFormat('Y-m-d H:i:s', $expires_at)->diffInDays()) : null; $inFuture = $expires_at != null ? \Carbon\Carbon::createFromFormat('Y-m-d H:i:s', $expires_at)->isFuture() : false; if ($inFuture == false) { $days = null; } @endphp @if ($days == null && $expires_at == null) {{ __('recurring.onetime') }} @endif @if (gettype($days) == "NULL" && $expires_at != null) {{ __('client.services.expired_at', ['date' => \Carbon\Carbon::createFromFormat('Y-m-d H:i:s', $expires_at)->format('d/m/y')]) }} @endif @if ($days >= 7) {{ __('client.services.daysremaining', ['days' => $days]) }} @endif @if ($days <= 3 && gettype($days) == "integer") @if ($days < 1) {{ __('client.services.dayremaining', ['days' => $days]) }} @else {{ __('client.services.daysremaining', ['days' => $days]) }} @endif @endif @if ($days < 7 && $days > 3) {{ __('client.services.daysremaining', ['days' => $days]) }} @endif