<commit_before><template>

  <div class="auth-message">
    <h1>
      {{ header }}
    </h1>
    <p>
      <slot name="details">
        {{ details || defaultDetails }}
      </slot>
    </p>
  </div>

</template>


<script>

  const userRoles = ['admin', 'adminOrCoach', 'learner', 'registeredUser', 'superuser'];

  export default {
    name: 'AuthMessage',
    props: {
      authorizedRole: {
        type: String,
        validator(role) {
          return userRoles.includes(role);
        },
        default: 'registeredUser',
      },
      header: {
        type: String,
        default() {
          return this.$tr('forgetToSignIn');
        },
      },
      details: { type: String },
    },
    computed: {
      defaultDetails() {
        return this.$tr(this.authorizedRole);
      },
    },
    $trs: {
      admin: 'You must be signed in as an Admin to view this page',
      adminOrCoach: 'You must be signed in as an Admin or Coach to view this page',
      learner: 'You must be signed in as a Learner to view this page',
      registeredUser: 'You must be signed in to view this page',
      superuser: 'You must have super admin permissions to view this page',
      forgetToSignIn: 'Did you forget to sign in?',
    },
  };

</script>


<style lang="scss" scoped>

  .auth-message {
    text-align: center;
  }

</style>
<commit_msg>Converting AuthMessage user type strings to lowercase to match string spec.<commit_after><template>

  <div class="auth-message">
    <h1>
      {{ header }}
    </h1>
    <p>
      <slot name="details">
        {{ details || defaultDetails }}
      </slot>
    </p>
  </div>

</template>


<script>

  const userRoles = ['admin', 'adminOrCoach', 'learner', 'registeredUser', 'superuser'];

  export default {
    name: 'AuthMessage',
    props: {
      authorizedRole: {
        type: String,
        validator(role) {
          return userRoles.includes(role);
        },
        default: 'registeredUser',
      },
      header: {
        type: String,
        default() {
          return this.$tr('forgetToSignIn');
        },
      },
      details: { type: String },
    },
    computed: {
      defaultDetails() {
        return this.$tr(this.authorizedRole);
      },
    },
    $trs: {
      admin: 'You must be signed in as an admin to view this page',
      adminOrCoach: 'You must be signed in as an admin or coach to view this page',
      learner: 'You must be signed in as a learner to view this page',
      registeredUser: 'You must be signed in to view this page',
      superuser: 'You must have super admin permissions to view this page',
      forgetToSignIn: 'Did you forget to sign in?',
    },
  };

</script>


<style lang="scss" scoped>

  .auth-message {
    text-align: center;
  }

</style>

{'fraction_non_alphanumeric': 0.13057553956834533, 'fraction_numerical': 0.0014388489208633094, 'mean_word_length': 2.1819221967963385, 'pattern_counts': {'":': 0, '<': 31, '<?xml version=': 0, '>': 31, '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': '6879305', 'n_tokens_mistral': 859, 'n_tokens_neox': 845, 'n_words': 264}