/** @license Copyright (c) 2018 The Polymer Project Authors. All rights reserved. This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as part of the polymer project is also subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt */ import { html } from '@polymer/lit-element'; import { PageViewElement } from './page-view-element.js'; import { connect } from 'pwa-helpers/connect-mixin.js'; // This element is connected to the Redux store. import { store } from '../store.js'; //These are the actions needed by this element. import { registerComp } from '../actions/firebase.js'; // We are lazy loading its reducer. import firebase from '../reducers/firebase.js'; store.addReducers({ firebase }); // These are the shared styles needed by this element. import { SharedStyles } from './shared-styles.js'; import { ButtonSharedStyles } from './button-shared-styles.js'; // Import paper elements import '@polymer/paper-input/paper-input.js'; import '@polymer/paper-button/paper-button.js'; import '@polymer/paper-card/paper-card.js'; // Import custom elements import './competition-element.js'; import './test-element.js'; class MaoCompetitions extends connect(store)(PageViewElement) { _render(props) { return html` ${SharedStyles} ${ButtonSharedStyles}

Nationals

This competition includes schools from many different states. filler filler filler filler filler filler filler filler filler

States

This competition includes schools from many different regions in Florida. filler filler filler filler filler filler filler filler filler

Regionals

Non-MAO Tests

All students must register and complete two of the tests to be qualified for national and/or state competitions.

`; } static get properties() { return { // This is the data from the store. registeredComps : Array, initialized : Boolean, nationalRegistered : Boolean, statesRegistered : Boolean }} _stateChanged(state) { this.initialized = state.firebase.initialized; this.registeredComps = state.firebase.registeredComps; //console.log(this.registeredComps); this.nationalRegistered = this.registeredComps.includes('nationals'); this.statesRegistered = this.registeredComps.includes('states'); } registerNationals() { this.nationalRegistered = true; store.dispatch(registerComp('nationals')) } registerStates() { this.statesRegistered = true; store.dispatch(registerComp('states')) } } window.customElements.define('mao-competitions', MaoCompetitions);