@php
$isOtherCategories = isset($category) && in_array($category->slug, ['ai_vision', 'ai_pdf', 'ai_chat_image']);
$disable_actions = $app_is_demo && $isOtherCategories;
$user_is_premium = false;
$plan = auth()->user()?->relationPlan;
if ($plan) {
$planType = strtolower($plan->plan_type ?? 'all');
if ($plan->plan_type === 'all' || $plan->plan_type === 'premium') {
$user_is_premium = true;
}
}
// $premium_features = \App\Models\OpenAIGenerator::query()->where('active', 1)->where('premium', 1)->get()->pluck('title')->toArray();
$premium_features = [
['title' => 'Chat History', 'is_pro' => false],
['title' => 'Chat with Document', 'is_pro' => false],
['title' => 'Unlimited Credits', 'is_pro' => true],
['title' => 'Chatbot Training', 'is_pro' => true],
['title' => 'Voice Chat', 'is_pro' => true],
['title' => 'Access to All AI Tools', 'is_pro' => true],
];
$ad_enabled = adsense('chat-pro-top-header-section-728x90');
@endphp
@extends('panel.layout.app', [
'disable_tblr' => true,
'layout_wide' => true,
'disable_titlebar' => true,
'disable_footer' => true,
'body_class' => 'lqd-chat-v2',
])
@section('title', $category->slug == 'ai_vision' ? __('Vision AI') : ($category->slug == 'ai_pdf' ? __('AI File Chat') : ($category->slug == 'ai_chat_image' ? __('Chat Image') :
__('AI Chat'))))
@section('titlebar_subtitle')
@if ($category->slug == 'ai_vision')
{{ __('Seamlessly upload any image you want to explore and get insightful conversations.') }}
@elseif ($category->slug == 'ai_pdf')
{{ __('Simply upload a PDF, find specific information. extract key insights or summarize the entire document.') }}
@elseif ($category->slug == 'ai_chat_image')
{{ __('Seamlessly generate and craft a diverse array of images without ever leaving your chat environment.') }}
@endif
@endsection
@push('after-body-open')
@endpush
@if ($ad_enabled)
@endif
@section('content')
@if ($category->slug == 'ai_webchat' && count($list) === 0)
@endif
{!! adsense_chat_pro_top_header_728x90() !!}
Auth::check(),
'flex border-b max-md:-mx-2 md:max-lg:-mx-5' => !Auth::check(),
])>
@include('panel.user.openai_chat.components.chat_category_dropdown')
@php
$route = 'dashboard.user.chat-setting.chat-template.create';
$customChat = \Illuminate\Support\Facades\Route::has($route) && setting('chat_setting_for_customer', 1) == 1;
@endphp
@auth
@if (!$isOtherCategories || $customChat)
@includeWhen(!$isOtherCategories, 'components.select-ai-model-list')
{{-- @if ($customChat) --}}
{{-- --}}
{{-- --}}
{{-- {{ __('New') }} --}}
{{-- --}}
{{-- @endif --}}
@endif
@else
@includeWhen(!$isOtherCategories, 'components.select-ai-model-list-un-auth')
@endauth
{{ __('More Options') }}
{{ __('Export') }}
@auth
@includeFirst(['chat-share::share-button-include', 'panel.user.openai_chat.includes.share-button-include', 'vendor.empty'])
{{ __('Share') }}
@endauth
@if (!in_array($category->slug, ['ai_pdf', 'ai_vision', 'ai_chat_image'], true))
@auth
el !== this).forEach(checkbox => checkbox.checked = this.checked)"
onchange="const checked = document.querySelector('#realtime').checked; if ( checked ) { toastr.success('Real-Time data activated') } else { toastr.warning('Real-Time data deactivated') }"
/>
@else
@endauth
@endif
@if ((!$user_is_premium || $app_is_demo) && !auth()->check())
{{ __('Upgrade') }}
{{ __('You are out of trial credits.') }}
{!! __('Upgrade your plan to unlock new AI capabilities.') !!}
{{ __('Register to access a world where creativity meets cutting-edge technology.') }}
@lang('Upgrade Your Plan')
@foreach ($premium_features as $feature)
-
{{ __($feature['title']) }}
@if ($feature['is_pro'])
{{ __('Pro') }}
@endif
@endforeach
@endif
@if (Theme::getSetting('dashboard.supportedColorSchemes') === 'all')
@endif
@auth
{{-- User menu --}}
@else
{!! __($fSetting->sign_in) !!}
{!! __($fSetting->join_hub) !!}
@endauth
Auth::check(),
'max-lg:h-[calc(100vh-2.5rem-var(--header-h))]' => !Auth::check(),
'conversation-started' => count($chat->messages ?? []) > 1,
'conversation-not-started' => count($chat->messages ?? []) <= 1,
])
:class="{ 'chats-sidebar-hidden': (($store.focusMode.active && sidebarHidden) || sidebarForceHidden) }"
>
!Auth::check(),
])
:class="{
'active': mobileSidebarShow || !sidebarHidden,
'lg:hidden': (($store.focusMode.active && sidebarHidden) || sidebarForceHidden)
}"
@click.outside="(e) => {return !sidebarHidden && !IsShowRecent(e?.target) && (sidebarHidden = true);}"
>
@if (view()->hasSection('chat_sidebar'))
@yield('chat_sidebar')
@else
@include('panel.user.openai_chat.components.chat_sidebar', [
'website_url' => 'chatpro',
])
@endif
@if ($chat != null)
@if (view()->hasSection('chat_area_container'))
@yield('chat_area_container')
@elseif (\App\Helpers\Classes\MarketplaceHelper::isRegistered('canvas') && (bool) setting('ai_chat_pro_canvas', 1))
@include('canvas::includes.chat_area_container')
@else
@include('ai-chat-pro::includes.chat_area_container')
@endif
@else
@endif
@lang('You')
@lang('AI Assistant')
@if (\App\Helpers\Classes\MarketplaceHelper::isRegistered('canvas') && (bool) setting('ai_chat_pro_canvas', 1))
@endif
@if (\App\Helpers\Classes\MarketplaceHelper::isRegistered('canvas') && (bool) setting('ai_chat_pro_canvas', 1))
@endif
@if (\App\Helpers\Classes\MarketplaceHelper::isRegistered('multi-model'))
@endif
@if ($category->prompt_prefix != null)
@else
@endif
@endsection
@push('script')
@include('panel.user.openai_chat.components.chat_js')
@endpush