@extends('frontend.main_master') @section('title', $title) @section('meta_description', $meta_description) @section('meta_keywords', $meta_keywords) @section('og_title', $og_title) @section('og_description', $og_description) @push('styles') @endpush @section('content')
{{ t('api-services-subnav-pricing') }}

{{ t('api-pricing-hero-title') }}

{{ t('api-pricing-hero-subtitle') }}

{{-- Satın alma yalnızca API panelinde yapılır; host config'ten gelir --}}

{{ str_replace(':host', $panelHost, t('api-pricing-panel-note')) }}

@include('frontend.api_products.partials.subnav') @php // Sekmeler: ?tab=plans|endpoints|credits (controller doğrular, varsayılan plans). $activeTab = $activeTab ?? 'plans'; $pricingTabs = [ 'plans' => t('api-pricing-plans-title'), 'endpoints' => t('api-pricing-endpoints-title'), 'credits' => t('api-pricing-packs-title'), ]; @endphp
{{-- Başlık sekme etiketinde görünüyor; burada yalnızca erişilebilirlik/SEO için. --}}

{{ t('api-pricing-plans-title') }}

{{ t('api-pricing-plans-subtitle') }}

@if ($plans->isEmpty())

{{ t('api-pricing-plans-empty') }}

@else
@foreach ($plans as $plan) @php $isHighlighted = $plan->code === 'pro'; @endphp
@if ($isHighlighted) {{ t('api-pricing-popular') }} @endif

{{ t($plan->name_key) }}

{{ $plan->description_key ? t($plan->description_key) : '' }}

@if ((float) $plan->monthly_price > 0) {{ number_format((float) $plan->monthly_price, 0, ',', '.') }} ₺ {{ t('api-pricing-monthly') }} @else {{ t('api-pricing-custom') }} @endif
  • {{ t('api-pricing-quota-label') }}: {{ $plan->isUnlimited() ? t('api-pricing-unlimited') : number_format($plan->monthly_request_quota, 0, ',', '.') }}
  • {{ t('api-pricing-rate-label') }}: {{ $plan->rate_limit_per_minute }}
  • {{ t('api-pricing-keys-label') }}: {{ $plan->max_keys }}
{{ t('api-pricing-features-label') }}
@foreach ($plan->features ?? [] as $feature) {{ $featureLabels[$feature] ?? $feature }} @endforeach
{{-- Satın alma API panelinde (API paneli): ana site oturumundan bağımsız --}} {{ t('api-pricing-cta-panel') }}
@endforeach
@endif

{{ t('api-pricing-vat-note') }}

{{-- Endpoint bazlı satış: plan almadan tek bir ucu satın alma (one_time / monthly) --}}

{{ t('api-pricing-endpoints-title') }}

{{ t('api-pricing-endpoints-subtitle') }}

@if (empty($endpointOfferGroups))

{{ t('api-pricing-endpoints-empty') }}

@else @foreach ($endpointOfferGroups as $offerGroup)

{{ t('api-group-' . $offerGroup['key'] . '-name') }}

@foreach ($offerGroup['skus'] as $offerSku)

{{ t($offerSku['name_key']) }}

@if ($offerSku['credits'] > 0) {{ t('api-pricing-credit-badge-label') }} {{ $offerSku['credits'] }} {{ t('api-services-credit-unit') }}/{{ t('api-pricing-per-request-unit') }} @endif
{{ $offerSku['method'] }} {{ $offerSku['path'] }} @if ($offerSku['credits'] > 0)

{{ str_replace(':credits', $offerSku['credits'], t('api-pricing-credit-note')) }}

@endif
    @foreach ($offerSku['offers'] as $offer) @php $offerLabel = str_replace( ':count', number_format($offer['requests'], 0, ',', '.'), t($offer['label_key']), ); @endphp
  • {{ t($offer['badge_key']) }} {{ $offerLabel }}
    {{ number_format($offer['price'], 0, ',', '.') }} ₺ @if ($offer['is_monthly']) {{ t('api-pricing-monthly') }} @endif
    {{ t('api-pricing-endpoint-buy') }}
  • @endforeach
@endforeach
@endforeach

{{ t('api-pricing-endpoints-note') }}

@endif

{{ t('api-pricing-packs-title') }}

{{ t('api-pricing-packs-subtitle') }}

@if ($creditPacks->isEmpty())

{{ t('api-pricing-packs-empty') }}

@else
@foreach ($creditPacks as $pack) @php $perCredit = $pack->credits > 0 ? (float) $pack->price / $pack->credits : 0; @endphp

{{ t($pack->name_key) }}

{{ number_format($pack->credits, 0, ',', '.') }} {{ t('api-pricing-pack-credits') }}
{{ number_format((float) $pack->price, 0, ',', '.') }} ₺

{{ number_format($perCredit, 2, ',', '.') }} ₺ / {{ t('api-pricing-pack-per-credit') }}

{{ t('api-pricing-endpoint-buy') }}
@endforeach
@endif
{{-- SSS ve kapanış CTA'sı sekmelerin dışında: hangi sekme açık olursa olsun görünür. --}}

{{ t('api-pricing-credits-title') }}

{{ t('api-pricing-credits-text') }}

{{ t('api-pricing-faq-title') }}

@foreach (range(1, 4) as $i)

{{ t('api-pricing-faq-a' . $i) }}
@endforeach

{{ t('api-pricing-cta-title') }}

{{ t('api-pricing-cta-text') }}

{{-- Sekme değişince adres çubuğundaki ?tab= güncellenir: link paylaşımı ve geri/ileri tuşu tutarlı kalır. --}} @endsection