<!--
   Copyright 2018 Brigham Young University

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
-->
<!--
{ "description": "An activity prompt inviting an applicant to share something about which they are
passionate.", "type": "activity", "uuid": "cea9a774-dfe8-4dfd-8a2a-bb2edc984407", "elements": [ { "id":
"88dfe659-1e56-4bd5-978c-48863f1eac82", "type": "Text", "prompt": "What is the airspeed of a laden
swallow?", "explanation": "If you do not recognize this question, you are not a Python.",
"response": "The airspeed of a laden swallow depends: is it African or European?", "responseSet": [
"drop-down options" ], "ordinal": "1", "limit": "2000", "responseCriteria": [ { "value": "0",
"label": "No Basis" } ], "responseRange": "5" } ], "groups": [ { "elements": [ { "responseCriteria":
[] } ] } ] }
-->
<template>
  <div v-if="activity">
    <h2>{{activity.type}}</h2>
    <h3>{{activity.description}}</h3>
    <template v-for="el of activity.elements">
      <h4>{{el.prompt}}</h4>
      <p>{{el.response}}</p>
    </template>
  </div>
</template>
<script>
  import { mapState } from 'vuex'

  export default {
    name: 'DetailsActivity',
    computed: {
      ...mapState({
        activity: state => state.application.activity
      })
    }
  }
</script>
<style scoped>
  h3 {
    font-size: 1rem;
    font-style: italic;
  }

  p {
    margin-left: 1rem;
    padding-left: 1.5rem;
    border-left: thick solid var(--light, #999);
  }
</style>
