@props(['product' , 'shopInventories'])
{{-- Image --}}
{{ $product->title }}
{{-- Main content --}}
{{ $product->title }}

{{-- Code --}} {{ __('code') }}: {{ $product->code }} {{-- Category --}} {{ __("category") }}: {{ $product->category?->name ?? __('without category') }}
{{ __("creator") }}: {{ $product->user->name ?? __("without creator") }} @if ($product->user !== null && $product->user->hasShop()) ({{ $product->user->shop->name }}) @endif
{{-- Status --}} @php $status = $product->status; // e.g. active/inactive/draft... $statusClass = match($status) { 'active' => 'text-bg-success', 'inactive' => 'text-bg-danger', 'draft' => 'text-bg-warning', default => 'text-bg-info', }; @endphp {{ __($status) }}
{{-- Prices (right side) --}}
{{ __('Price') }}
{{ number_format($product->price) }}

{{-- Actions --}}
@can('product.show') {{ __('Show') }} @endcan @can('product.edit') {{ __('Edit') }} @endcan @can('product.delete')
@csrf @method('DELETE')
@endcan
{{-- Inventory CTA (full width on small screens) --}} @can('product.add.inventory')
@if(array_search($product->id, array_values($shopInventories)) === false) @else
{{ __('you already add this product') }} {{ __('see my inventory') }}
@endif
@endcan
@pushonce('styles') @endpushonce