<commit_before>import PropTypes from 'prop-types';
import React from 'react';

import Modal from '@department-of-veterans-affairs/jean-pants/Modal';
import recordEvent from '../../../monitoring/record-event';
import { login, signup } from '../../../utilities/authentication';

const loginHandler = (loginType) => () => {
  recordEvent({ event: `login-attempted-${loginType}` });
  login(loginType);
};

const handleDsLogon = loginHandler('dslogon');
const handleMhv = loginHandler('mhv');
const handleIdMe = loginHandler('idme');

class SignInModal extends React.Component {
  componentDidUpdate(prevProps) {
    if (!prevProps.visible && this.props.visible) {
      recordEvent({ event: 'login-modal-opened' });
    }
  }

  renderModalContent = () => {
    return (
      <main className="login">
        <div className="row">
          <div className="columns">
            <div className="logo">
              <a href="/">
                <img alt="vets.gov" className="va-header-logo" src="/img/design/logo/logo-alt.png"/>
              </a>
            </div>
          </div>
        </div>
        <div className="container">
          <div className="row">
            <div className="columns small-12">
              <h1>Sign in to Vets.gov</h1>
            </div>
          </div>
          <div className="row hide-for-medium-up mobile-explanation">
            <div className="columns small-12">
              <h2>One site. A lifetime of benefits and services at your fingertips.</h2>
            </div><commit_msg>Add DSLogon notification banner for current outage (#7660)<commit_after>import PropTypes from 'prop-types';
import React from 'react';
import AlertBox from '@department-of-veterans-affairs/jean-pants/AlertBox';

import Modal from '@department-of-veterans-affairs/jean-pants/Modal';
import recordEvent from '../../../monitoring/record-event';
import { login, signup } from '../../../utilities/authentication';

const loginHandler = (loginType) => () => {
  recordEvent({ event: `login-attempted-${loginType}` });
  login(loginType);
};

const handleDsLogon = loginHandler('dslogon');
const handleMhv = loginHandler('mhv');
const handleIdMe = loginHandler('idme');

class SignInModal extends React.Component {
  componentDidUpdate(prevProps) {
    if (!prevProps.visible && this.props.visible) {
      recordEvent({ event: 'login-modal-opened' });
    }
  }

  renderModalContent = () => {
    return (
      <main className="login">
        <div className="row">
          <div className="columns">
            <div className="logo">
              <a href="/">
                <img alt="vets.gov" className="va-header-logo" src="/img/design/logo/logo-alt.png"/>
              </a>
            </div>
          </div>
        </div>
        <div className="container">
          <div className="row">
            <div className="columns small-12">
              <h1>Sign in to Vets.gov</h1>
            </div>
          </div>
          <div className="row hide-for-medium-up mobile-explanation">
            <div className="columns small-12">
              <h2>One site. A lifetime of benefits and services at your fingertips.</h2>
            </div>
          </div>
          <div className="downtime-notification row">
            <div className="columns usa-width-one-half medium-6">
              <div className="form-warning-banner">
                <AlertBox
                  headline="DS Logon isn't working quite right"
                  content="If you're having trouble signing in to Vets.gov using your DS Logon ID and password, please try again later. Or, you can try signing in with your MyHealth_e_Vet ID and password or through ID.me."
                  isVisible
                  status="warning"/>
                <br/>
              </div>
            </div>
{'fraction_non_alphanumeric': 0.1442459274829217, 'fraction_numerical': 0.005517603783499738, 'mean_word_length': 2.2932525951557095, 'pattern_counts': {'":': 0, '<': 55, '<?xml version=': 0, '>': 61, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7656519', 'n_tokens_mistral': 1100, 'n_tokens_neox': 1066, 'n_words': 266}