Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
*/
import {addHasRemoveClass, BaseElement, observer} from '@material/mwc-base/base-element.js';
import {MDCSnackbarAdapter} from '@material/snackbar/adapter.js';
import MDCSnackbarFoundation from '@material/snackbar/foundation.js';
import {MDCSnackbarCloseEventDetail} from '@material/snackbar/types';
import {html, property, query} from 'lit-element';
import {classMap} from 'lit-html/directives/class-map';
import {accessibleSnackbarLabel} from './accessible-snackbar-label-directive';
const {
OPENING_EVENT,
OPENED_EVENT,
CLOSING_EVENT,
CLOSED_EVENT,
} = MDCSnackbarFoundation.strings;
export class SnackbarBase extends BaseElement {
protected mdcFoundation!: MDCSnackbarFoundation;
protected readonly mdcFoundationClass = MDCSnackbarFoundation;
@query('.mdc-snackbar') protected mdcRoot!: HTMLElement;
@query('.mdc-snackbar__label') protected labelElement!: HTMLElement;
@property({type: Boolean, reflect: true}) isOpen = false;
@observer(function(this: SnackbarBase, value: number) {
this.mdcFoundation.setTimeoutMs(value);
})
@property({type: Number})