UNPKG

@lipagas/storefront-engine

Version:

Headless Commerce & Marketplace Extension for Fleetbase

22 lines (17 loc) 528 B
import Component from '@glimmer/component'; import { action } from '@ember/object'; import { isArray } from '@ember/array'; export default class ModalsStoreFormComponent extends Component { get activeStore() { return this.args.options.store; } @action addTag(tag) { if (!isArray(this.activeStore.tags)) { this.activeStore.tags = []; } this.activeStore.tags?.pushObject(tag); } @action removeTag(index) { this.activeStore.tags?.removeAt(index); } }