@extends(Theme::viewName('layout'))

@section('title', trans($active_tab == 'login' ? 'auth.login_page_title' : 'auth.register_page_title'))
@section('content')
    <div class="container">
        <div class="row">
            <div class="col-md-8 ml-md-auto mr-md-auto">
                <div class="card">
                    <div class="card-header">
                        <ul class="nav nav-tabs card-header-tabs">
                            @if (!$is_sso)
                                <li class="nav-item">
                                    <a class="nav-link{{ $active_tab == 'login' ? ' active' : '' }}" href="{{ url('/login') }}">@lang('auth.login_page_title')</a>
                                </li>
                                @if (UserConfig::get('allow_self_registration'))
                                    <li class="nav-item">
                                        <a class="nav-link{{ $active_tab == 'register' ? ' active' : '' }}" href="{{ url('/register') }}">@lang('auth.register_page_title')</a>
                                    </li>
                                @endif
                            @else
                                @if ($active_tab == 'register')
                                    <li class="nav-item">
                                        <a class="nav-link active" href="{{ route('auth.register_sso') }}">@lang('auth.register_page_title')</a>
                                    </li>
                                @elseif ($active_tab == 'login')
                                    <li class="nav-item">
                                        <a class="nav-link active" href="{{ route('auth.login_sso') }}">@lang('auth.login_page_title')</a>
                                    </li>
                                @endif
                            @endif
                        </ul>
                    </div>
                    <div class="card-body">
                        @if ($active_tab == 'login')
                            @include(Theme::viewName('partials.login'))
                        @elseif ($active_tab == 'register')
                            @include(Theme::viewName('partials.register'))
                        @endif
                    </div>
                </div>
            </div>
        </div>
    </div>
@endsection