<div class="flex flex-col gap-6">
  <app-card-data cardTitle="اطلاعات فعالیت اقتصادی" [editable]="true" [(editMode)]="editMode">
    <ng-template #moreActions>
      <a routerLink pButton [routerLink]="goodsPageRoute()" outlined size="small">مدیریت کالاها</a>
    </ng-template>
    <div class="flex flex-col gap-4">
      <div class="listKeyValue">
        <app-key-value label="عنوان" [value]="business()?.name" />
        <app-key-value label="کد اقتصادی" [value]="business()?.economic_code" />
        <app-key-value label="صنف" [value]="business()?.guild?.name" />
      </div>
      <p-divider align="center">اطلاعات لایسنس</p-divider>
      <div class="listKeyValue">
        <app-key-value label="تاریخ پایان لایسنس" [value]="business()?.license_info?.expires_at" type="date" />
        <app-key-value label="محدودیت کاربر" [value]="business()?.license_info?.accounts_limit" />
        <app-key-value label="تعداد کاربران ایجاد شده" [value]="business()?.license_info?.allocated_account_count" />
      </div>
    </div>
  </app-card-data>

  <consumer-complex-list [businessId]="businessId()" />

  <consumer-businessActivity-form
    [(visible)]="editMode"
    [editMode]="true"
    [businessId]="businessId()"
    [initialValues]="business() || undefined"
    (onSubmit)="getData()"
  />
</div>
