@extends('panel.layout.app') @section('title', __('Favorite Templates')) @section('content')
@php $plan = Auth::user()->activePlan(); $plan_type = 'regular'; if ( $plan != null ) { $plan_type = strtolower($plan->plan_type); } @endphp @foreach(Auth::user()->favoriteOpenai as $item) @php $upgrade = false; if ( $item->premium == 1 && $plan_type === 'regular' ){ $upgrade = true; } @endphp
@if ( $item->image !== 'none' ) {!! html_entity_decode($item->image) !!} @endif @if($item->active == 1) @else @endif

{{__($item->title)}}

{{__($item->description)}}
@if($item->active == 1) @if (!$upgrade) @if(!isFavorited($item->id)) @else @endif @endif
@if($upgrade)
{{__('Upgrade')}}
{{__('Upgrade')}} @elseif($item->type == 'text' or $item->type == 'code') @if(Auth::user()->remaining_words > 0 or Auth::user()->remaining_words == -1) {{__('Create Workbook')}} @endif @elseif($item->type == 'voiceover') @if(Auth::user()->remaining_words > 0 or Auth::user()->remaining_words == -1) {{__('Create Workbook')}} @endif @elseif($item->type == 'image') @if(Auth::user()->remaining_images > 0 or Auth::user()->remaining_images == -1) {{__('Create')}} @endif @elseif($item->type == 'audio') @if(Auth::user()->remaining_words>0 or Auth::user()->remaining_words == -1) {{__('Create')}} @endif @else @endif
@endif
@endforeach
@endsection @section('script') @endsection