@extends ('layout.main')
@section('content')
    <!-- Content Wrapper. Contains page content -->
    <div class="content-wrapper">
        <!-- Content Header (Page header) -->
        <div class="content-header">
            <div class="container-fluid">
                <div class="row mb-2">
                    <div class="col-sm-6">
                        <h1 class="m-0">User</h1>
                    </div><!-- /.col -->
                    <div class="col-sm-6">
                        <ol class="breadcrumb float-sm-right">
                            <li class="breadcrumb-item"><a href="#">Home</a></li>
                            <li class="breadcrumb-item active">Tambah User</li>
                        </ol>
                    </div><!-- /.col -->
                </div><!-- /.row -->
            </div><!-- /.container-fluid -->
        </div>
        <!-- Main content -->

        <section class="content">
            <div class="container-fluid">
                <form action="{{route('admin.user.store')}}" method="POST" enctype="multipart/form-data">
                    @csrf
                    <div class="row">
                        <!-- left column -->
                        <div class="col-md-6">
                            <!-- general form elements -->
                            <div class="card card-primary">
                                <div class="card-header">
                                    <h3 class="card-title">From Tambah User</h3>
                                </div>
                                <!-- /.card-header -->
                                <!-- form start -->
                                <form>
                                    <div class="card-body">
                                        <div class="form-group">
                                            <label for="exampleInputEmail1">Email</label>
                                            <input type="text" class="form-control" id="exampleInputEmail1" name="email"
                                                placeholder="Enter email">
                                            @error('email')
                                                <div class="alert alert-danger mt-1" id="alert">{{ $message }}</div>
                                                <script>
                                                    setTimeout(function() {
                                                    document.getElementById('alert').style.display = 'none';
                                                  }, 3000);
                                                </script>
                                            @enderror
                                        </div>
                                        <div class="form-group">
                                            <label for="exampleInputName1">Name</label>
                                            <input type="text" class="form-control" id="exampleInputEmail1" name="name"
                                                placeholder="Enter name">
                                                @error('name')
                                                <div class="alert alert-danger mt-1" id="alert-2">{{ $message }}</div>
                                                <script>
                                                    setTimeout(function() {
                                                    document.getElementById('alert-2').style.display = 'none';
                                                  }, 3000);
                                                </script>
                                            @enderror
                                        </div>
                                        <div class="form-group">
                                            <label for="exampleInputPassword1">Password</label>
                                            <input type="password" class="form-control" id="exampleInputPassword1" name="password"
                                                placeholder="Password">
                                            @error('password')
                                                <div class="alert alert-danger mt-1" id="alert-3">{{ $message }}</div>
                                                <script>
                                                    setTimeout(function() {
                                                    document.getElementById('alert-3').style.display = 'none';
                                                  }, 3000);
                                                </script>
                                            @enderror
                                        </div>
                                        <div class="form-group">
                                            <label for="exampleInputFile">File input</label>
                                            <div class="input-group">
                                                <div class="custom-file">
                                                    <input type="file" class="custom-file-input" id="exampleInputFile">
                                                    <label class="custom-file-label" for="exampleInputFile">Choose file</label>
                                                </div>
                                                <div class="input-group-append">
                                                    <span class="input-group-text">Upload</span>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="form-check">
                                            <input type="checkbox" class="form-check-input" id="exampleCheck1">
                                            <label class="form-check-label" for="exampleCheck1">Check me out</label>
                                        </div>
                                    </div>
                                    <!-- /.card-body -->
    
                                    <div class="card-footer">
                                        <button type="submit" class="btn btn-primary">Create</button>
                                        <a href="{{route('admin.index')}}" class="btn btn-warning mx-3">Back</a>
                                    </div>
                                </form>
                            </div>
                        </div>
                    </div>
                </form>

            </div>

    </div>

    </div>

    </div>
    </section>

    </div>
@endsection
