{"size": 2600, "ext": "js", "max_stars_repo_path": "node_modules/sails-generate/lib/core-generators/new/templates/assets/js/components/account-notification-banner.component.js", "max_stars_repo_name": "SnowPrimate/ChaosRadio", "max_stars_repo_stars_event_min_datetime": "2015-05-14T22:24:05.000Z", "max_stars_repo_stars_event_max_datetime": "2021-01-13T19:25:23.000Z", "max_issues_repo_path": "node_modules/sails-generate/lib/core-generators/new/templates/assets/js/components/account-notification-banner.component.js", "max_issues_repo_name": "SnowPrimate/ChaosRadio", "max_issues_repo_issues_event_min_datetime": "2015-01-05T09:19:25.000Z", "max_issues_repo_issues_event_max_datetime": "2022-01-29T00:49:08.000Z", "max_forks_repo_path": "node_modules/sails-generate/lib/core-generators/new/templates/assets/js/components/account-notification-banner.component.js", "max_forks_repo_name": "SnowPrimate/ChaosRadio", "max_forks_repo_forks_event_min_datetime": "2015-04-08T10:00:09.000Z", "max_forks_repo_forks_event_max_datetime": "2021-08-30T18:23:28.000Z"}
{"max_stars_count": 19, "max_issues_count": 28, "max_forks_count": 35, "avg_line_length": 27.6595744681, "max_line_length": 151, "alphanum_fraction": 0.3103846154}
/**
 * <account-notification-banner>
 * -----------------------------------------------------------------------------
 *
 * @type {Component}
 *
 * -----------------------------------------------------------------------------
 */

parasails.registerComponent('account-notification-banner', {

  //  ╔═╗╦ ╦╔╗ ╦  ╦╔═╗  ╔═╗╦═╗╔═╗╔═╗╔═╗
  //  ╠═╝║ ║╠╩╗║  ║║    ╠═╝╠╦╝║ ║╠═╝╚═╗
  //  ╩  ╚═╝╚═╝╩═╝╩╚═╝  ╩  ╩╚═╚═╝╩  ╚═╝
  props: [],

  //  ╦╔╗╔╦╔╦╗╦╔═╗╦    ╦╔╗╔╔╦╗╔═╗╦═╗╔╗╔╔═╗╦    ╔═╗╔╦╗╔═╗╔╦╗╔═╗
  //  ║║║║║ ║ ║╠═╣║    ║║║║ ║ ║╣ ╠╦╝║║║╠═╣║    ╚═╗ ║ ╠═╣ ║ ║╣
  //  ╩╝╚╝╩ ╩ ╩╩ ╩╩═╝  ╩╝╚╝ ╩ ╚═╝╩╚═╝╚╝╩ ╩╩═╝  ╚═╝ ╩ ╩ ╩ ╩ ╚═╝
  data: function () {
    return {
      notificationText: '',
      roomName: undefined,
    };
  },


  //  ╦ ╦╔╦╗╔╦╗╦
  //  ╠═╣ ║ ║║║║
  //  ╩ ╩ ╩ ╩ ╩╩═╝
  template: `
  <div>
    <div class="container-fluid">
      <div class="alert alert-warning mt-2 small" role="alert" v-if="notificationText">
        {{notificationText}}
      </div>
    </div>
  </div>
  `,


  //  ╦  ╦╔═╗╔═╗╔═╗╦ ╦╔═╗╦  ╔═╗
  //  ║  ║╠╣ ║╣ ║  ╚╦╝║  ║  ║╣
  //  ╩═╝╩╚  ╚═╝╚═╝ ╩ ╚═╝╩═╝╚═╝
  mounted: async function() {
    await Cloud.observeMySession();
    // Listen for updates to the user's session
    Cloud.on('session', (msg)=>{
      if(msg.notificationText) {
        this.notificationText = msg.notificationText;
      } else {
        this.notificationText = '';
      }
    });//œ
  },

  beforeDestroy: function() {
    Cloud.off('session');
  },

  watch: {
    loggedInUserId: function(unused) { throw new Error('Changes to `loggedInUserId` are not currently supported in <account-notification-banner>!'); },
  },

  //  ╦╔╗╔╔╦╗╔═╗╦═╗╔═╗╔═╗╔╦╗╦╔═╗╔╗╔╔═╗
  //  ║║║║ ║ ║╣ ╠╦╝╠═╣║   ║ ║║ ║║║║╚═╗
  //  ╩╝╚╝ ╩ ╚═╝╩╚═╩ ╩╚═╝ ╩ ╩╚═╝╝╚╝╚═╝
  methods: {

    //  ╦╔╗╔╔╦╗╔═╗╦═╗╔╗╔╔═╗╦    ╔═╗╦  ╦╔═╗╔╗╔╔╦╗  ╦ ╦╔═╗╔╗╔╔╦╗╦  ╔═╗╦═╗╔═╗
    //  ║║║║ ║ ║╣ ╠╦╝║║║╠═╣║    ║╣ ╚╗╔╝║╣ ║║║ ║   ╠═╣╠═╣║║║ ║║║  ║╣ ╠╦╝╚═╗
    //  ╩╝╚╝ ╩ ╚═╝╩╚═╝╚╝╩ ╩╩═╝  ╚═╝ ╚╝ ╚═╝╝╚╝ ╩   ╩ ╩╩ ╩╝╚╝═╩╝╩═╝╚═╝╩╚═╚═╝

    //…

    //  ╔═╗╦ ╦╔╗ ╦  ╦╔═╗  ╔╦╗╔═╗╔╦╗╦ ╦╔═╗╔╦╗╔═╗
    //  ╠═╝║ ║╠╩╗║  ║║    ║║║║╣  ║ ╠═╣║ ║ ║║╚═╗
    //  ╩  ╚═╝╚═╝╩═╝╩╚═╝  ╩ ╩╚═╝ ╩ ╩ ╩╚═╝═╩╝╚═╝
    // > Public methods are rarely exposed by Vue components, but sometimes they
    // > are an important escape hatch.  They are callable via something like
    // > `this.$refs.componentNameInCamelCase.doSomething())`, and, by convention,
    // > are always prefixed with "do".
    // N/A

    //  ╔═╗╦═╗╦╦  ╦╔═╗╔╦╗╔═╗  ╔╦╗╔═╗╔╦╗╦ ╦╔═╗╔╦╗╔═╗
    //  ╠═╝╠╦╝║╚╗╔╝╠═╣ ║ ║╣   ║║║║╣  ║ ╠═╣║ ║ ║║╚═╗
    //  ╩  ╩╚═╩ ╚╝ ╩ ╩ ╩ ╚═╝  ╩ ╩╚═╝ ╩ ╩ ╩╚═╝═╩╝╚═╝

    //…

  }

});
