// import { CatalogRoleTagComponent } from '@/shared/catalog/roles';
import { PosInfoStore } from '@/domains/pos/store/pos.store';
import { PageLoadingComponent } from '@/shared/components/page-loading.component';
import { Component, computed, inject } from '@angular/core';
import { PosGoodsComponent } from '../components/goods.component';
import { PosOrderSectionComponent } from '../components/order/order-section.component';

@Component({
  selector: 'pos-landing',
  templateUrl: './root.component.html',
  host: { class: 'grow overflow-hidden' },

  imports: [PosGoodsComponent, PosOrderSectionComponent, PageLoadingComponent],
})
export class PosLandingComponent {
  private readonly store = inject(PosInfoStore);

  readonly loading = computed(() => this.store.loading());
  readonly pos = computed(() => this.store.entity());
  readonly error = computed(() => this.store.error());

  getData() {
    this.store.getData().subscribe();
  }
}
