import Component from '@glimmer/component'; import { action } from '@ember/object'; import { inject as service } from '@ember/service'; import Icon from '#components/icon'; import { on } from '@ember/modifier'; import { tracked } from '@glimmer/tracking'; import Modal from './modal'; import NostrConnect from './nostr-connect'; export default class UserMenuComponent extends Component { @service storage; @service osmAuth; @service nostrAuth; @tracked isNostrConnectModalOpen = false; @action connectRS() { this.args.onClose(); this.args.storage.showConnectWidget(); } @action disconnectRS() { this.args.storage.disconnect(); } @action connectOsm() { this.args.onClose(); this.osmAuth.login(); } @action disconnectOsm() { this.osmAuth.logout(); } @action openNostrConnectModal() { this.isNostrConnectModalOpen = true; } @action closeNostrConnectModal() { this.isNostrConnectModalOpen = false; } @action disconnectNostr() { this.nostrAuth.logout(); } }