import Component from '@glimmer/component'; import { service } from '@ember/service'; import { action } from '@ember/object'; import { fn } from '@ember/helper'; import { on } from '@ember/modifier'; import Icon from '#components/icon'; import { htmlSafe } from '@ember/template'; export default class ListsIndexTemplate extends Component { @service storage; @service router; @service mapUi; styleFor(color) { const finalColor = color || getComputedStyle(document.documentElement) .getPropertyValue('--default-list-color') .trim(); return htmlSafe(`background-color: ${finalColor}`); } @action selectList(listId) { this.router.transitionTo('lists.list', listId); } @action close() { this.router.transitionTo('index'); } @action backToMenu() { this.router.transitionTo('menu'); } }