@extends('layouts.guest')

@section('title', 'Register')

@section('content')
    <h1>Create workspace</h1>
    <form method="POST" action="{{ route('register') }}">
        @csrf
        <div class="form-group">
            <label for="company_name">Company name</label>
            <input id="company_name" class="form-control" type="text" name="company_name" value="{{ old('company_name') }}" required>
            @error('company_name')<div class="error-text">{{ $message }}</div>@enderror
        </div>
        <div class="form-group">
            <label for="name">Your name</label>
            <input id="name" class="form-control" type="text" name="name" value="{{ old('name') }}" required>
            @error('name')<div class="error-text">{{ $message }}</div>@enderror
        </div>
        <div class="form-group">
            <label for="email">Email</label>
            <input id="email" class="form-control" type="email" name="email" value="{{ old('email') }}" required>
            @error('email')<div class="error-text">{{ $message }}</div>@enderror
        </div>
        <div class="form-group">
            <label for="password">Password</label>
            <input id="password" class="form-control" type="password" name="password" required autocomplete="new-password">
            @error('password')<div class="error-text">{{ $message }}</div>@enderror
        </div>
        <div class="form-group">
            <label for="password_confirmation">Confirm password</label>
            <input id="password_confirmation" class="form-control" type="password" name="password_confirmation" required autocomplete="new-password">
        </div>
        <div class="flex-between">
            <a href="{{ route('login') }}" style="font-size:0.85rem">Already registered?</a>
            <button type="submit" class="btn btn-primary">Register</button>
        </div>
    </form>
@endsection
