<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta content="IE=edge" http-equiv="X-UA-Compatible">
  <meta content="width=device-width, initial-scale=1" name="viewport">
  <meta content="Insura is an online Insurance Agency Management System" name="description">
  <meta content="Simcy Creative" name="author">
  <title><?php echo e(trans('auth.title.' . $state)); ?> - <?php echo e(config('insura.name')); ?> | Insurance Agency Management System</title>
  <base href="<?php echo e(env('BASE_HREF', '')); ?>" />
  <!-- Favicon -->
  <link href="<?php echo e(asset('favicon.ico')); ?>" rel="icon" sizes="16x16" type="image/x-icon">
  <link href="<?php echo e(asset('uploads/images/' . config('insura.favicon'))); ?>" rel="icon" type="<?php echo e(mime_content_type(storage_path() . '/app/images/' . config('insura.favicon'))); ?>">
  <!-- Font and Icon Fonts -->
  <link href="https://fonts.googleapis.com/css?family=Alegreya+Sans:300,400,500,700" rel="stylesheet">
  <link href="<?php echo e(asset('assets/fonts/ionicons/css/ionicons.min.css')); ?>" rel="stylesheet">
  <!-- Core CSS -->
  <link href="<?php echo e(asset('assets/libs/bootstrap/bootstrap.min.css')); ?>" rel="stylesheet">
  <link href="<?php echo e(asset('assets/libs/semantic-UI/semantic.min.css')); ?>" rel="stylesheet">
  <!-- Page Specific CSS -->
  
  <!-- Custom CSS -->
  <link href="<?php echo e(asset('assets/css/style.css')); ?>" rel="stylesheet">
  <!-- Extra Customization CSS -->
  
  <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
  <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
  <!--[if lt IE 9]>
    <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
    <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
  <![endif]-->
</head>
<body class="auth">
  <div class="auth-card">
    <div class="auth-branding">
      <img src="<?php echo e(asset('uploads/images/' . config('insura.favicon'))); ?>">
    </div>
    <div class="sign-in" style="<?php echo e($state === 'login' ? '' : 'display:none;'); ?>">
      <h3><?php echo e(trans('auth.header.login', array(
        'system_name' => config('insura.name')
      ))); ?></h3>
      <p><?php echo e(trans('auth.welcome.login')); ?></p>
      <?php if($state === 'login'): ?>
        <?php echo $__env->make('global.status', ['errors' => $errors->login], array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
      <?php endif; ?>
      <form action="<?php echo e(action('Auth\AuthController@postLogin')); ?>" method="POST">
        <?php echo csrf_field(); ?>

        <div class="ui form">
          <div class="field required">
            <label><?php echo e(trans('auth.input.label.email')); ?></label>
            <input type="text" name="email" placeholder="<?php echo e(trans('auth.input.placeholder.email')); ?>" required value="<?php echo e(old('email')); ?>">
          </div>
          <div class="field required">
            <label><?php echo e(trans('auth.input.label.password')); ?></label>
            <input type="password" name="password" placeholder="<?php echo e(trans('auth.input.placeholder.password')); ?>" required>
          </div>
          <div class="ui toggle checkbox">
            <input type="checkbox"<?php echo e(old('remember') ? ' checked' : ''); ?> id="remember" name="remember">
            <label for="remember"><?php echo e(trans('auth.input.label.remember')); ?></label>
          </div>
          <div class="field text-right">
            <a href="" class="forgot auth-action" action="forgot-password"><?php echo e(trans('auth.link.forgot')); ?></a>
          </div>
          <div class="field">
            <button class="ui button fluid positive" type="submit"><?php echo e(trans('auth.button.login')); ?></button>
          </div>
        </div>
      </form>
      <p><?php echo e(trans('auth.request.register')); ?> <a href="" class="text-primary auth-action" action="sign-up"><?php echo e(trans('auth.link.register')); ?></a></p>
    </div>

    <div class="sign-up" style="<?php echo e($state === 'register' ? '' : 'display:none;'); ?>">
      <h3><?php echo e(trans('auth.header.register')); ?></h3>
      <p><?php echo e(trans('auth.welcome.register', array(
        'system_name' => config('insura.name')
      ))); ?></p>
      <?php if($state === 'register'): ?>
        <?php echo $__env->make('global.status', ['errors' => $errors->register], array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
      <?php endif; ?>
      <form action="<?php echo e(action('Auth\AuthController@postRegister')); ?>" method="POST">
        <?php echo csrf_field(); ?>

        <div class="ui form">
            <div class="two fields">
              <div class="field required">
                <label><?php echo e(trans('auth.input.label.first_name')); ?></label>
                <input type="text" name="first_name" placeholder="<?php echo e(trans('auth.input.placeholder.first_name')); ?>" required value="<?php echo e(old('first_name')); ?>">
              </div>
              <div class="field">
                <label><?php echo e(trans('auth.input.label.last_name')); ?></label>
                <input type="text" name="last_name" placeholder="<?php echo e(trans('auth.input.placeholder.last_name')); ?>" value="<?php echo e(old('last_name')); ?>">
              </div>
            </div>
          <div class="field required">
            <label><?php echo e(trans('auth.input.label.email')); ?></label>
            <input type="email" name="email" placeholder="<?php echo e(trans('auth.input.placeholder.email')); ?>" required value="<?php echo e(old('email')); ?>">
          </div>
          <div class="field required">
            <label><?php echo e(trans('auth.input.label.company_name')); ?></label>
            <input type="text" name="company_name" placeholder="<?php echo e(trans('auth.input.placeholder.company_name')); ?>" required value="<?php echo e(old('company_name')); ?>">
          </div>
          <div class="two fields">
            <div class="field required">
              <label><?php echo e(trans('auth.input.label.password')); ?></label>
              <input type="password" name="password" placeholder="<?php echo e(trans('auth.input.placeholder.password')); ?>" required>
            </div>
            <div class="field required">            
              <label><?php echo e(trans('auth.input.label.password_confirmation')); ?></label>
              <input type="password" name="password_confirmation" placeholder="<?php echo e(trans('auth.input.placeholder.password_confirmation')); ?>" required>
            </div>
          </div>
          <div class="field">
            <button class="ui button fluid positive" type="submit"><?php echo e(trans('auth.button.register')); ?></button>
          </div>
        </div>
      </form>
      <p><?php echo e(trans('auth.request.login')); ?> <a href="" class="text-primary auth-action" action="sign-in"><?php echo e(trans('auth.link.login')); ?></a></p>
    </div>

    <div class="forgot-password" style="<?php echo e($state === 'forgot' ? '' : 'display:none;'); ?>">
      <h3><?php echo e(trans('auth.header.forgot')); ?></h3>
      <p><?php echo e(trans('auth.welcome.forgot')); ?></p>
      <?php if($state === 'forgot'): ?>
        <?php echo $__env->make('global.status', ['errors' => $errors->forgot], array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
      <?php endif; ?>
      <form action="<?php echo e(action('Auth\PasswordController@postEmail')); ?>" method="POST">
        <?php echo csrf_field(); ?>

        <div class="ui form">
          <div class="field required">
            <label><?php echo e(trans('auth.input.label.email')); ?></label>
            <input type="email" name="email" placeholder="<?php echo e(trans('auth.input.placeholder.email')); ?>" required value="<?php echo e(old('email')); ?>">
          </div>
          <div class="field">
            <button class="ui button fluid positive" type="submit"><?php echo e(trans('auth.button.forgot')); ?></button>
          </div>
        </div>
      </form>
      <p><?php echo e(trans('auth.request.login')); ?> <a href="" class="text-primary auth-action" action="sign-in"><?php echo e(trans('auth.link.login')); ?></a></p>
    </div>

    <?php if($state === 'reset'): ?>
    <div class="reset" style="">
      <h3><?php echo e(trans('auth.header.reset')); ?></h3>
      <p><?php echo e(trans('auth.welcome.reset')); ?></p>
      <?php echo $__env->make('global.status', ['errors' => $errors->reset], array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
      <form action="<?php echo e(action('Auth\PasswordController@postReset')); ?>" method="POST">
        <?php echo csrf_field(); ?>

        <input type="hidden" name="token" value="<?php echo e(isset($token) ? $token : ''); ?>">
        <div class="ui form">
          <div class="field required">
            <label><?php echo e(trans('auth.input.label.email')); ?></label>
            <input type="email" name="email" placeholder="<?php echo e(trans('auth.input.placeholder.email')); ?>" required value="<?php echo e(isset($email) ? $email : old('email')); ?>"/>
          </div>
          <div class="field required">
            <label><?php echo e(trans('auth.input.label.password_reset')); ?></label>
            <input type="password" name="password" placeholder="<?php echo e(trans('auth.input.placeholder.password_reset')); ?>" required/>
          </div>
          <div class="field required">
            <label><?php echo e(trans('auth.input.label.password_confirmation')); ?></label>
            <input type="password" name="password_confirmation" placeholder="<?php echo e(trans('auth.input.placeholder.password_confirmation')); ?>" required/>
          </div>
          <div class="field">
            <button class="ui button fluid positive" type="submit"><?php echo e(trans('auth.button.reset')); ?></button>
          </div>
        </div>
      </form>
      <p><?php echo e(trans('auth.request.login')); ?> <a href="" class="text-primary auth-action" action="sign-in"><?php echo e(trans('auth.link.login')); ?></a></p>
    </div>
    <?php endif; ?>

    <?php if($state === 'activate'): ?>
    <div class="activate" style="">
      <h3><?php echo e(trans('auth.header.activate')); ?></h3>
      <p><?php echo e(trans('auth.welcome.activate')); ?></p>
      <?php echo $__env->make('global.status', ['errors' => $errors->activate], array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
      <form action="<?php echo e(action('Auth\PasswordController@postActivate')); ?>" method="POST">
        <?php echo csrf_field(); ?>

        <input type="hidden" name="token" value="<?php echo e(isset($token) ? $token : old('token')); ?>">
        <input type="hidden" name="email" value="<?php echo e(isset($email) ? $email : old('email')); ?>"/>
        <div class="ui form">
          <div class="field required">
            <label><?php echo e(trans('auth.input.label.password')); ?></label>
            <input type="password" name="password" placeholder="<?php echo e(trans('auth.input.placeholder.password')); ?>" required/>
          </div>
          <div class="field required">
            <label><?php echo e(trans('auth.input.label.password_confirmation')); ?></label>
            <input type="password" name="password_confirmation" placeholder="<?php echo e(trans('auth.input.placeholder.password_confirmation')); ?>" required/>
          </div>
          <div class="field">
            <button class="ui button fluid positive" type="submit"><?php echo e(trans('auth.button.activate')); ?></button>
          </div>
        </div>
      </form>
      <p><?php echo e(trans('auth.request.login')); ?> <a href="" class="text-primary auth-action" action="sign-in"><?php echo e(trans('auth.link.login')); ?></a></p>
    </div>
    <?php endif; ?>
    <div style="text-align:center;">
      <div class="button dropdown selection floating fluid icon labeled pointed search ui">
        <i class="world icon"></i>
        <span class="text"><?php echo e(trans('auth.input.label.language')); ?></span>
        <div class="menu">
          <?php foreach(config('insura.languages') as $language): ?>
          <a class="item" href="<?php echo e(action('Auth\AuthController@getAuth', array('language' => $language['locale']))); ?>"><?php echo e($language['name']); ?></a>
          <?php endforeach; ?>
        </div>
      </div>
    </div>
  </div>
  <!-- Core Scripts -->
  <script src="<?php echo e(asset('assets/js/jquery-3.2.1.min.js')); ?>"></script>
  <script src="<?php echo e(asset('assets/libs/semantic-UI/semantic.min.js')); ?>"></script>
  <script src="<?php echo e(asset('assets/js/insura.js')); ?>" type="text/javascript"></script>
  <!-- Page Specific Scripts -->
  <script src="<?php echo e(asset('assets/js/auth.js')); ?>"></script>
  <!-- Extra Scripts -->
  <script type="text/javascript">
    (function($insura, $) {
      $(document).ready(function() {
        $insura.helpers.initDropdown('div.dropdown');

        $('<?php echo array(
          'login'     => 'div.sign-in input[name="email"]',
          'register'  => 'div.sign-up input[name="first_name"]',
          'forgot'    => 'div.forgot-password input[name="email"]',
          'reset'     => 'div.reset input[name="password"]',
          'activate'  => 'div.activate input[name="password"]'
        )[$state]; ?>').focus();
      });
    })(window.insura, window.jQuery);
  </script>
  
</body>
</html>
