@extends('profile.layout')
@section('title', __('Yeni səhifə yarat'))
@php
$pageTypes = [
['id' => 'default', 'icon' => 'link', 'title' => 'Bio-link', 'desc' => 'Instagram bio üçün link səhifəsi', 'accent' => 'bg-primarysoft text-primary'],
['id' => 'mini_site', 'icon' => 'smartphone', 'title' => 'Mini-səhifə','desc' => 'Hazır şablonla mini sayt', 'accent' => 'bg-purplesoft text-purple'],
['id' => 'menu', 'icon' => 'utensils', 'title' => 'QR-Menyu', 'desc' => 'Restoran və kafe üçün rəqəmsal menyu', 'accent' => 'bg-warningsoft text-warning'],
['id' => 'shop', 'icon' => 'shopping-bag', 'title' => 'Mağaza', 'desc' => 'Məhsul vitrini və səbət', 'accent' => 'bg-successsoft text-success'],
];
@endphp
@section('content')
{{ __('Yeni səhifə yarat') }}
{{ __('Bir neçə addımda hazır səhifənizi yaradın') }}
{{-- Steps (desktop) --}}
@foreach([__('Səhifə növü'), __('Dizayn'), __('Tənzimləmələr')] as $i => $label)
{{ $i + 1 }}
{{ $label }}
@if($i < 2)
@endif
@endforeach
{{-- Steps (mobile progress) --}}
{{-- STEP 1: Type --}}
{{ __('Səhifə növünü seçin') }}
@foreach($pageTypes as $type)
@if(in_array($type['id'], $allowedPageTypes))
@else
{{ $type['title'] }}
{{ $profileUser->pageTypePlanName($type['id']) ?? __('Premium') }} {{ __('tarifində') }}
@endif
@endforeach
{{-- STEP 2: Template --}}
{{ __('Dizayn seçin') }}
{{-- Filters --}}
{{ __('Kateqoriyalar') }}
@foreach($templates->pluck('category')->filter()->unique()->sort()->values() as $cat)
@endforeach
{{ __('Rənglər') }}
@foreach(['tünd'=>'#0f172a','açıq'=>'#f1f5f9','göy'=>'#3b82f6','yaşıl'=>'#22c55e','qırmızı'=>'#ef4444','sarı'=>'#eab308','bənövşəyi'=>'#8b5cf6','narıncı'=>'#f97316'] as $color => $hex)
@endforeach
{{ __('Şablon seçin') }}
{{-- Templates grid --}}
@foreach($templates as $tpl)
@php $isLocked = $tpl->plan_id && $userPlanId && (int) $tpl->plan_id !== (int) $userPlanId; @endphp
@if($tpl->thumbnail)

@else
@endif
@if($isLocked)
{{ $tpl->plan->name ?? __('Premium') }}
@else
@endif
{{ $tpl->name }}
{{ $tpl->plan->name ?? __('Hamısı') }}
{{ $tpl->category ?? 'Ümumi' }}
@endforeach
{{-- Empty state --}}
{{ __('Nəticə tapılmadı') }}
{{ __('Filtrlərə uyğun şablon tapılmadı') }}
{{-- STEP 3: Settings --}}
{{ __('Tənzimləmələr') }}
{{-- Step 1 & 2 footers --}}
{{-- Detail modal --}}
{{-- Locked template popup --}}
{{ __('Premium şablon') }}
{{ __('Bu dizayn yalnız') }} {{ __('tarifi abunəçiləri üçündür') }}
@endsection
@push('scripts')
@endpush