"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } var Modal = /*#__PURE__*/ function () { function Modal(time) { _classCallCheck(this, Modal); this.time = time; } _createClass(Modal, [{ key: "setDuration", value: function setDuration(d) { this.time = d; } }, { key: "create", value: function create(html, options) { window.Materialize ? window.Materialize.toast(html, this.time) : window.M && window.M.toast(_objectSpread({ html: html, displayLength: this.time }, options)); } }, { key: "success", value: function success(html) { this.create(html, { classes: " green darken-3" }); } }, { key: "notify", value: function notify(html) { this.create(html, { classes: "blue lighten-2" }); } }, { key: "warning", value: function warning(html) { this.create(html, { classes: "orange lighten-2" }); } }, { key: "error", value: function error(html) { this.create(html, { classes: "red lighten-2" }); } }, { key: "clear", value: function clear() {} }]); return Modal; }(); var _default = new Modal(5000); exports.default = _default;