<?php

namespace Tobuli\Popups\Rules;

use Illuminate\Html\FormFacade;

class FirstLogin extends BaseRule {
    public function getFields() {
        return [
            FormFacade::label('rules['.self::class.']', trans('front.first_login')),
            FormFacade::hidden('rules['.self::class.'][active]', 1),
        ];
    }

    public  function doesApply() {
        if ( ! $this->user) return false;

        return $this->user->loged_at == '0000-00-00 00:00:00';
    }

}