<?php

namespace App\Forms\Auth;

use App\Forms\CommonForm;

class GoogleForm extends CommonForm
{
  public function __construct()
  {
    parent::__construct();
  }
  public function form_init_process(string $action, array &$formDatas = []): void
  {
    parent::form_init_process($action, $formDatas);
    $fields = ['access_code'];
    $filters = [];
    switch ($action) {
      case 'login':
      case 'login_form':
        break;
    }
    $this->setFormFields($fields);
    $this->setFormRules($fields);
    $this->setFormFilters($filters);
    $this->setFormOptions($filters);
    $this->setBatchjobFilters($filters);
  }
  public function getFormRule(string $field, array $formRules): array
  {
    switch ($field) {
      case "access_code":
        $formRules[$field] = "required|trim|string";
      default:
        $formRules = parent::getFormRule($field, $formRules);
        break;
    }
    return $formRules;
  }
}
