@extends('layouts.admin') @section('admin-content')

{{ __('app.Edit_programming_language') }}

{{ __('app.modify_language_settings_and_templates') }}

{{ __('app.language_overview') }}

@if($programmingLanguage->is_active) {{ __('app.Active') }} @else {{ __('app.inactive') }} @endif
@if($programmingLanguage->icon) @else @endif

{{ $programmingLanguage->name }}

{{ $programmingLanguage->slug }}

@if($programmingLanguage->description)

{{ Str::limit($programmingLanguage->description, 100) }}

@endif

{{ $programmingLanguage->products()->count() }}

{{ __('app.Total_products') }}

{{ $programmingLanguage->products()->where('is_active', true)->count() }} {{ __('app.Active') }}

{{ __('app.template_status') }}

@if($programmingLanguage->hasTemplateFile()) {{ __('app.custom_template') }} @else {{ __('app.default_template') }} @endif

@csrf @method('PUT')

{{ __('app.basic_details') }}

{{ __('app.Required') }}
@error('app.Name')
{{ $message }}
@enderror
{{ __('app.leave_empty_auto_generate') }} @error('app.Slug')
{{ $message }}
@enderror
@error('app.file_extension')
{{ $message }}
@enderror
{{ __('app.fontawesome_icon_class') }} @error('icon')
{{ $message }}
@enderror
@error('app.Description')
{{ $message }}
@enderror

{{ __('app.advanced_settings') }}

@error('app.sort_order')
{{ $message }}
@enderror
is_active) ? 'checked' : '' }} class="form-check-input">
{{ __('app.language_will_be_available') }}

{{ __('app.quick_stats') }}

{{ $programmingLanguage->products()->count() }}
{{ __('app.Products') }}
{{ $programmingLanguage->products()->where('is_active', true)->count() }}
{{ __('app.Active_products') }}
{{ $programmingLanguage->products()->withCount('licenses')->get()->sum('licenses_count') }}
{{ __('app.Licenses') }}

{{ __('app.meta_information') }}

{{ __('app.Created_at') }}: {{ $programmingLanguage->created_at->format('M d, Y') }}
{{ __('app.updated_at') }}: {{ $programmingLanguage->updated_at->format('M d, Y') }}
{{ __('app.sort_order') }}: #{{ $programmingLanguage->sort_order }}
{{ __('app.Cancel') }}
@csrf @method('PUT')

{{ __('app.license_template_editor') }}

{{ __('app.available_placeholders') }}: {LICENSE_KEY}, {PRODUCT_NAME}, {CUSTOMER_EMAIL}
@error('app.license_template')

{{ $message }}

@enderror

{{ __('app.live_preview') }}

@if($programmingLanguage->license_template) {{ $programmingLanguage->license_template }} @else {{ __('app.No_custom_template') }} @endif

{{ __('app.template_actions') }}

{{ __('app.template_info') }}

{{ __('app.Status') }}: @if($programmingLanguage->hasTemplateFile()) {{ __('app.custom') }} @else {{ __('app.default') }} @endif
@if($programmingLanguage->hasTemplateFile())
{{ __('app.file_size') }}: {{ number_format($programmingLanguage->getTemplateInfo()['file_size'] / 1024, 1) }} KB
{{ __('app.last_modified') }}: {{ $programmingLanguage->getTemplateInfo()['last_modified'] }}
@endif
{{ __('app.Cancel') }}

{{ __('app.usage_statistics') }}

{{ $programmingLanguage->products()->count() }}

{{ __('app.Total_products') }}

{{ $programmingLanguage->products()->where('is_active', true)->count() }}

{{ __('app.Active_products') }}

{{ $programmingLanguage->products()->withCount('licenses')->get()->sum('licenses_count') }}

{{ __('app.Total_licenses_issued') }}

{{ __('app.products_using_language') }}

@if($programmingLanguage->products()->count() > 0)
@foreach($programmingLanguage->products()->take(10)->get() as $product) @endforeach
{{ __('app.Product') }} {{ __('app.Licenses') }} {{ __('app.Status') }}
@if($product->image) {{ $product->name }} @else
@endif
{{ $product->name }}
{{ $product->licenses()->count() }} @if($product->is_active) {{ __('app.Active') }} @else {{ __('app.inactive') }} @endif
@if($programmingLanguage->products()->count() > 10)
{{ __('app.and_more_products', ['count' => $programmingLanguage->products()->count() - 10]) }}
@endif
@else

{{ __('app.No_products_yet') }}

{{ __('app.No_products_using_language') }}

@endif
@endsection