@props([ 'board', 'variant' => 'tenant', 'post' => null, 'mode' => 'index', ]) @php $authGuard = $variant === 'platform' ? 'web' : 'tenant'; $currentUser = auth($authGuard)->user(); $isManager = $currentUser?->isManager() ?? false; $isShowMode = $mode === 'show' && $post; $indexUrl = $variant === 'platform' ? route('platform.posts.index', $board) : tenant_url(null, $board->slug); $createUrl = $variant === 'platform' ? route('platform.posts.create', $board) : tenant_url(null, $board->slug . '/create'); $editUrl = $isShowMode ? ($variant === 'platform' ? route('platform.posts.edit', ['board' => $board, 'post' => $post]) : tenant_url(null, $board->slug . '/' . $post->slug . '/edit')) : null; $deleteAction = $isShowMode ? ($variant === 'platform' ? route('platform.posts.destroy', ['board' => $board, 'post' => $post]) : tenant_url(null, $board->slug . '/' . $post->slug)) : null; $guestPasswordUrl = $isShowMode && $post->isGuest() ? ($variant === 'platform' ? route('platform.posts.password', ['board' => $board, 'post' => $post]) : tenant_url(null, $board->slug . '/' . $post->slug . '/password')) : null; @endphp @if ($isManager)