;(function(define){'use strict';define(function(require,exports,module){ /** * Dependencies */ var component = require('gaia-component'); /** * Register the element. * * @return {Element} constructor */ module.exports = component.register('gaia-modal', { /** * Called when the element is first created. * * Here we create the shadow-root and * inject our template into it. * * @private */ created: function() { this.setupShadowRoot(); // Properties this.active = this.getAttribute('active'); }, /** * Known attribute property * descriptors. * * These setters get called when matching * attributes change on the element. * * @type {Object} */ attrs: { active: { get: function() { return this._active || false; }, set: function(value) { value = !!(value || value === ''); if (value === this.active) { return; } this._active = value; if (value) { this.setAttr('active', ''); } else { this.removeAttr('active'); } } } }, open: function() { this.active = true; }, close: function() { this.active = false; }, template: `