@extends('layouts.public') @section('content') @php /** * Marketing opt-out confirmation. Four states on one page, mirroring the storefront's other * single-message screens (resources/views/public/table-closed.blade.php): the standard `.qm-page-head` * band, then a `.qm-empty` block inside a `.qm-section`. * * @var string $state confirm | done | already | resubscribed | invalid * @var string $email the address the token belongs to ('' when the token is unknown) * @var string $token */ $state = $state ?? 'invalid'; $email = $email ?? ''; $token = $token ?? ''; $shown = '' . e($email) . ''; @endphp

{{ t_raw('unsubscribe.title') }}

@php /* The page's messages belong UNDER its title band, inside the page the reader is looking at — not floating above it. getFlashes() consumes, so the layout's own call further out finds nothing and does not draw it twice. */ @endphp
@partial('flash')
@if ($state === 'confirm')

{!! t_raw('unsubscribe.confirm_body', [':email' => $shown]) !!}

@csrf {{ t_raw('common.cancel') }}
@elseif ($state === 'done' || $state === 'already')

{!! t_raw('unsubscribe.done_body', [':email' => $shown]) !!}

{{ t_raw('unsubscribe.done_transactional') }}

@php // The token stays valid, so the way back is on the same page rather than a support email. @endphp
@csrf {{ t_raw('error.go_home') }}
@elseif ($state === 'resubscribed')

{!! t_raw('unsubscribe.resubscribed_body', [':email' => $shown]) !!}

@else

{{ t_raw('unsubscribe.invalid_body') }}

@endif
@endsection