@extends('frame') 

@section('title', 'Den | Member Admin')

    @php
    switch($mode)
        {
            case 'member-create':
                $action_url = '/den/member/create';
                break;
            case 'member-edit':
                $action_url = '/den/member/edit';
                break;
            case 'admin-create':
                $action_url = '/den/member/admin-create';
                break;
        }
    @endphp
    @section('main-content')
        <section>
            <article>
                @switch($mode)
                    @case('member-edit') 
                    <h2>Edit Info for {{$member->handle}}</h2>
                    @include('forms.member-edit') 
                    <br />
                    @break

                    @case('member-create') 
                    <h2>New Member Info</h2>
                    @include('forms.member-edit') 
                    <br />
                    @break

                    @case('admin-create') 
                    <h2>Make your first account</h2>
                    *This will be your administrator account.
                    @include('forms.member-edit') 
                    <br />
                    @break

                    @default
                        <h2>Member Listing </h2>
                        @foreach($members as $member)
                            <a href="/den/member/{{$member->uuid}}">{{$member->handle}}</a><br />
                        @endforeach
                        <h2>Add Member </h2>
                        <a href="/den/member/edit/create">Make a new friend</a><br />
                    @endswitch
            </article>
        </section>
    @endsection